Answer this @Rollerqueen
Given below is a program to find factorial of a number. Find out the missing line:
n = int(input("Enter n: "))
if n < 0:
print("negative number")
elif n == 0:
print(1)
else:
------missing line-------
fac = fac*i
print(fac)
Answers
Answered by
1
The older man approached the counter with no sign of friendliness in his eyes. On paying attention, Ray noticed the shape of a gun and a restless hand in the man's right coat packet. This made Ray think that the visitor was not really a shopper.
pls mark brainliest
Answered by
1
- C0DE
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
n=int(input("Input a number to compute the factiorial : "))
print(factorial(n))
- OUTPUT
Input a number to compute the factiorial : 4
24
Similar questions