memo = {}

def fib(n):
    if n < 1: return 0
    if n < 3: return 1
    if n not in memo: 
        memo[n] = fib(n - 1) + fib(n - 2)
    return memo[n]
    
for i in range(10):
    print(fib(i))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: