0

Python

If n <= 1 : return n else: return(recur_fibo(n-1) + recur_fibo(n-2)) n term if n term <=0: print (“please enter a postive integer”) else: print (“Fibonacci sequence”) for i in range (nterms): print (recur_fibo(i)) Whats wrong?

12th Apr 2022, 11:43 AM
Nini
Nini - avatar
3 Respostas
+ 3
Pls save in playground and share link. Indentation matters in python.. edit: Nini function declaration header is missing!!! def recur_fibo(n) : ntems value missing #no space or use n_terms take input nterms = int( input()) correct these mistakes
12th Apr 2022, 12:07 PM
Jayakrishna 🇮🇳
0
Indentation.
13th Apr 2022, 2:48 AM
Luis André Baroni Istúriz
Luis André Baroni Istúriz - avatar
0
chiziq
14th Apr 2022, 9:18 AM
Hasanjon Toshkentov