Skip to content

Instantly share code, notes, and snippets.

@younisrahman
Created February 13, 2020 21:54
Show Gist options
  • Save younisrahman/3c2d6a2136683511bcb219eb99806457 to your computer and use it in GitHub Desktop.
Save younisrahman/3c2d6a2136683511bcb219eb99806457 to your computer and use it in GitHub Desktop.
Factorial Python
def fact(n):
f=1
for i in range(1,n+1):
f= f*i
return f
x = int(input("Enter your value: "))
print(fact(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment