Write a program in python to input any number and find its factorial value
Note- The factorial of a number is the product of all the integers from 1 to that number. For example, the factorial of 5 is 1*2*3*4*5 = 120 . Factorial is not defined for negative numbers, and the factorial of zero is one, 0! = 1
------------------------------------------------
number=int(input("Enter any Number : "))
fact=1
for a in range(1,number+1):
fact=fact*a
print("Factorial of ",a," is : ",fact)
------------------------------------------------
Output-
Enter any Number : 6
Factorial of 6 is : 720
0 Comments