def fib(n):
if n<=2:
return 1
def fib(n):
if n<=2:
return 1
else:
return fib(n-1)+fib(n-2)
def fib(n):
if n<=2:
return 1
else:
return fib(n-1)+fib(n-2)
for n in range(1,101):
print(n,fib(n))
If you have seen the result, you might say: HEY, why did it stop?
Because it is slow. More of that later.