Skip to main content
my python programs
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
June 28, 2020
Factorial of number using recursion
what is factorial?
def fact(n):
if n==1 or n==0:
return 1
pass
return n*fact(n-1)
pass
x=int(input("enter number "))
print("factorial is ",fact(x))