Calculate the factorial of a number

Asked: Anonymously |Category: Python

n=eval(input("Enter the number"))

temp=n

fac=1

while temp>0:

fac*=temp

temp-=1

print('factorial of',n,'is',fac)


4 views

Recent Posts

See All

"Believe you can and you're halfway there"