Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3df093a

Browse filesBrowse files
AryashDubeyabranhe
authored andcommitted
Create Factorial By Recursion Python.py
1 parent 5536881 commit 3df093a
Copy full SHA for 3df093a

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#FINDING FACTORIAL THROUGH RECURSION
2+
def recursion(n):
3+
if(n==0):
4+
return 1
5+
else:
6+
return n*recursion(n-1)
7+
a=int(input("Enter The Number You Want The Factorial Of")) #Asking User The Number for the factorial
8+
if(a>=0): # Checking if the Number is positive or not
9+
print(recursion())
10+
else:
11+
print("Enter Valid Positive Number")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.