Skip to content

Instantly share code, notes, and snippets.

@ImOmkar
Created August 16, 2018 18:39
Show Gist options
  • Save ImOmkar/ca689beea969cf23a61ffb79807c3b82 to your computer and use it in GitHub Desktop.
Save ImOmkar/ca689beea969cf23a61ffb79807c3b82 to your computer and use it in GitHub Desktop.
Program to find factorial of a given number
fact=1
num=int(input("Enter the number")) #input from user, and type is integer.
for i in range(1,num+1):
fact=fact*i
print("Factorial of a number",num,"is",fact)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment