algorithms/fibs/recursive_fibs.py

10 lines
159 B
Python
Raw Normal View History

2024-01-12 09:36:47 -05:00
def fib(n):
if n <= 1:
return n
else:
return fib(n-1) + fib(n-2)
out = [fib(i) for i in range(1,54)]
for line in out:
print(line)