Write a python function which calculates the factorial of a number.
# Write a python function which calculates the factorial of a number.
def fact2():
fa = 1
x = int(input("enter the number"))
for i in range (1,x+1):
fa = fa * i
print (fa)
fact2()
Comments
Post a Comment