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
Math,
4 months ago
English,
4 months ago
History,
9 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago