F Factorial of a number using Python Programming | CodeTheta

Factorial of a number using Python Programming

June 18, 2018

Code : 
num = int(input("Enter any number: "))
fact = 1
for i in range(1,num + 1):
    fact = fact * i
print("Factorial result is: ",fact)

Output :
Enter any number: 8
Factorial result is:  40320

IDE Used To Test This Code : Python IDLE.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment