We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5536881 commit 3df093aCopy full SHA for 3df093a
algorithms/recursion/Factorial By Recursion Python.py
@@ -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