0

Fibonacci series by recursion Python please explain the program and if i enter 5 then 5 comes on output 5 why

def fib (n): if n==0: return 0 elif n==1: return 1 else: return fib(n-1)+fib(n-2) num=int(input ("enter the number")) a=fib(num) print (a)

13th Jul 2022, 4:26 AM
Abhishek
Abhishek - avatar
1 Answer
0
Recursion kaise ho raha hai
13th Jul 2022, 6:38 AM
Abhishek
Abhishek - avatar