Created
April 19, 2020 14:57
-
-
Save Deep18-03/a7d6968b835906d25d29d4175b71a364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#factorial | |
def factorial(n): | |
""" | |
5*4*3*2*1 | |
""" | |
if n==1: | |
return 1 | |
else: | |
return n*factorial(n-1) | |
number=int(input("enter the number")) | |
print(factorial(number)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment