def recur_fibonacci(n):
    if(n<=1):
        return n
    else:
        return(fibonacci(n-1)+fibonacci(n-2))
n=int(input("enter a number of terms"))
print("fibonacci sequence:")
for i in range(n):
        print(fibonacci(i))

Embed on website

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