Answer to Question #283431 in Python for Rishu Pandey

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


1
Expert's answer
2021-12-29T02:19:44-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS