Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SakshamChauhan23/b91edf4e514730981bf19729c9eeab7c to your computer and use it in GitHub Desktop.
Save SakshamChauhan23/b91edf4e514730981bf19729c9eeab7c to your computer and use it in GitHub Desktop.
num = int(input("Enter a number"))
fact = 1
for i in range(1, num+1):
fact = fact * i
print("Factorial of", num, "is", fact)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment