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)


5 views0 comments

Recent Posts

See All