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.
2 parents 09ba744 + 547568c commit c4d78d1Copy full SHA for c4d78d1
12_Recursion/fibonacci.py
@@ -0,0 +1,9 @@
1
+## Fibonacci series ka nth term recursive function se find karo.
2
+def fibonacci(n):
3
+ if n <= 1:
4
+ return n
5
+ return fibonacci(n - 1) + fibonacci(n - 2)
6
+
7
+print(fibonacci(6)) # Output: 8
8
9
+## fibonacci(n) = fibonacci(n-1) + fibonacci(n-2) formula use hota hai.
0 commit comments