Create facto.py

pull/20/head
Neetansh 2019-10-07 12:46:03 +05:30 committed by GitHub
parent 94faec41b8
commit 52f5febafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

7
facto.py 100644
View File

@ -0,0 +1,7 @@
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
n=int(input("Input a number to compute the factiorial : "))
print(factorial(n))