fibbonaci
This commit is contained in:
parent
2297220759
commit
3106a55d8e
|
@ -0,0 +1,6 @@
|
||||||
|
def fib(n):
|
||||||
|
fibs = [0, 1]
|
||||||
|
for i in range(2, n+1):
|
||||||
|
fibs.append(fibs[i-1] + fibs[i-2])
|
||||||
|
print(fibs)
|
||||||
|
return fibs[n]
|
Loading…
Reference in New Issue