Q. Predict the output of the following code fragment ?


def check (n1 = 1, n2 = 2):

    n1 = n1 + n2

    n2 += 1

    print (n1, n2)

check()

check (2, 1)

check (3)


Answer :-

Output :-

3 3
3 2
5 3

>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post