You are viewing a single comment's thread. Return to all comments →
def fibonacci(n): # Write your code here. a=0 b=1 k.append(a) k.append(b) while(n+2>0): c=a+b a=b b=c k.append(c) n-=1 n = int(input()) k=[] fibonacci(n) print(k[n])
Seems like cookies are disabled on this browser, please enable them to open this website
Recursion: Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
Basic code using python