Question:
Program for Fibonacci numbers using recursive functions
Explanation:
The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ……..
For Example:
Number 7
Result:13
Program:
def Fibonacci(n):
if n<0:
print("Incorrect input")
elif n==0:
return 0
elif n==1:
return 1
else:
return Fibonacci(n-1)+Fibonacci(n-2)
print(Fibonacci(7))
---------End---------