Answers for "fibonacci sequence recurrence in python"

0

fibonacci sequence python

def fib(n):
    a = 0
    b = 1

    print(a)    
    print(b)

    for i in range(2, n):
        print(a+b)
        a, b = b, a + b

fib(7) #first seven nubers of Fibonacci sequence
Posted by: Guest on February-07-2021

Code answers related to "fibonacci sequence recurrence in python"

Python Answers by Framework

Browse Popular Code Answers by Language