How to make factorial of a number in python? Learning Python - 6th Night - 2

 Use this function to get factorial of a number x

def fact(x):
for i in range(1,x):
x *= i
return x

print(fact(6))

Comments

Popular posts from this blog

Husband's Affair with Step Daughter Ends in Grisly Murder (True Crime Documentary)