Open In Colab

Project 1: Create a Program in Python to Generate the Fibonacci Sequence

In [1]:
def fibo(m):
    a, b = 0, 1
    for i in range(m):
        print(a)
        a, b = b, a+b
In [2]:
def fi(n):
    a, b = 0, 1
    L = [0]
    for i in range(n-1):
        a, b = b, a+b
        L. append(a)
    return L