Computer Science, asked by ashlymohan, 9 months ago

def factorial(n):
result = 1
for x in range(1,___):
result = ___ * ___
return ___

for n in range(___,___):
print(n, factorial(n+___))

Answers

Answered by codec
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