M
Q. What is the output of the below code?
Code:
def fun(n,res=1):
if(n<=0):
return res
return fun(n-1,n*res)
print(fun(5))
if(n<=0):
return res
return fun(n-1,n*res)
print(fun(5))
- Correct Answer - Option(D)
- Views: 148
- Filed under category Python
Discusssion
Login to discuss.