Skip to content

Commit

Permalink
Merge pull request #1 from rohankhdbzmf/patch-1
Browse files Browse the repository at this point in the history
Update factorial.py
  • Loading branch information
saksham101 authored Oct 5, 2020
2 parents 08d6562 + b39c489 commit b3016a4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions factorial.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# New Blank File
num = input("Enter a number: ")
def recur_factorial(n):
if n == 1:
return n
elif n < 1:
return ("NA")
else:
return n*recur_factorial(n-1)
print (recur_factorial(int(num)))

0 comments on commit b3016a4

Please sign in to comment.