Header Ads

Python programs coding series - Find factorial of a number





#find factorial of a number

x = int(input("Enter the number : "))

factorial=1

for i in range(1,x+1):
    factorial = factorial*i

print("the factorial of "+str(x)+" is "+str(factorial))


Output

No comments

Theme images by sebastian-julian. Powered by Blogger.