Recursion in Python MCQs Exercise II

Ques 1 Recursion


What is the output of the following Python Code?


def xyz(i,j,k):
    if i&j==0:
        print(i,j)
        return -1
    else:
        xyz(i-1,j+1,k)
xyz(30,60,10)

A 26 64
B 27 62
C 67 34
D 30 60

Ques 2 Recursion


What is the output of the following Python Code?


def fun(a,b):
    if a>0:
        return (a%b)+fun(a//b,b)
    else:
        return 0
print(fun(451,11))

A 17
B 11
C 10
D 9