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
2 ответов
0
Recursion kaise ho raha hai
13th Jul 2022, 6:38 AM
Abhishek
Abhishek - avatar
Актуальное сегодня
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes