0

What is coding to gat factorial of a given no.

3rd Oct 2016, 4:16 PM
Jayash Pandey
Jayash Pandey - avatar
4 Réponses
+ 3
def fact(n): if (n <= 0): return 1 else: return fact(n-1)*n
3rd Oct 2016, 4:57 PM
Zen
Zen - avatar
+ 2
u can use this def fact(x): if x == 0: return 1 else : return x * fact(x-1)
3rd Oct 2016, 5:02 PM
hassan omar
hassan omar - avatar
+ 1
Off course
3rd Oct 2016, 5:07 PM
Rohit Ratnani
Rohit Ratnani - avatar
0
will it work?
3rd Oct 2016, 4:59 PM
Jayash Pandey
Jayash Pandey - avatar