Question #283431

write a program to print the factorial of N .Factorial is the product of all positive integers less than or equal to N


Expert's answer

N = int(input("Enter a number: "))
factorial = 1
if N >= 1:
    for i in range (1,N+1):
       factorial = factorial * i
print(f"Factorail of {N} is: {factorial}")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS