Examveda

What will be the output of the following Python code?
def test(i,j):
    if(i==0):
        return j
    else:
        return test(i-1,i+j)
print(test(4,7))

A. 13

B. 7

C. Infinite loop

D. 17

Answer: Option D


This Question Belongs to Python Program >> Functions In Python

Join The Discussion

Related Questions on Functions in Python