def factorial(n):
result = 1
for x in range(1,___):
result = ___ * ___
return ___
for n in range(___,___):
print(n, factorial(n+___))
Answers
Answered by
1
Answer:
def factorial(n):
if n == 1:
return 1
return n * factorial(n-1)
num = int(input("Enter the number: "))
print(factorial(num))
Explanation:
this is the simplest way i can think of to get the factorial
Similar questions
Science,
4 months ago
Biology,
4 months ago
History,
4 months ago
History,
9 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago