Python Lab Manual / Python Program for Factorial of Number

Program Name

Write a Python Program for Factorial of Number .
Theory
Factorial of Number is computed 
num=int(input("Enter a number:"))
fact=1
for i in range(1,num+1):
   fact*=i
print("Factorial of the Given Number: ",fact)
Program Code


Input:
Python Program for Factorial of Number 
Enter a number:5
Output:
Factorial of the Given Number:  120


Home     Back