Untitled
user_2026396
plain_text
a year ago
218 B
17
Indexable
#Factorial Recursion#
#4! = 4*3*2*1#
def factorial(n):
if n == 0 or n == 1:
return 1
n = n * factorial(n-1)
return n
fact = input("Enter Num: ")
print(factorial(int(fact)))
Editor is loading...
Leave a Comment