Q:1 Write a program to Calculate the factorial of the inputted numbers.
Program: 1:
number=int(input("Enter the number factorial number"))
fact=1
i=1
while i<=number:
fact=fact*i
i=i+1
print("The factorial of ",number," is = ",fact)
Output:
Press F5 or Run module:
Comments
Post a Comment