find factorial of number using python
Answers
Answered by
11
def find_factorial(n):
if n == 1 or n == 0:
return 1
factorial = 1
for x in range(1, n + 1, 1):
factorial *= x
return factorial
n = int(input("enter a number: "))
print(f"Factorial of {n} = {find_factorial(n)}")
Answered by
2
Similar questions