Observe the following Python code?
def a(n):
if n == 0:
return 0
else:
return n*a(n - 1)
def b(n, tot):
if n == 0:
return tot
Else:
return b(n-2, tot-2)
Both a() and b() aren’t tail recursive
b() is tail recursive but a() isn’t
a() is tail recursive but b() isn’t
Both a() and b() are tail recursive
This question is part of this quiz :
Recursion in Python Quiz