0
What is coding to gat factorial of a given no.
4 ответов
+ 3
def fact(n):
if (n <= 0):
return 1
else:
return fact(n-1)*n
+ 2
u can use this
def fact(x):
if x == 0:
return 1
else :
return x * fact(x-1)
+ 1
Off course
0
will it work?