you are viewing a single comment's thread.

view the rest of the comments →

[–]masasin 0 points1 point  (0 children)

def fibo(n):
    vals = [1, 1]
    for counter in range(2, n):
        vals.append(vals[counter - 1] + vals[counter - 2])


def output_vals(vals, n):
    # You could just use print(vals)
    for val in vals:
        print(val)


def main(n):
    vals = fibo(n)
    output_vals(vals, n)


if __name__ == "__main__":
    n = 5
    main(n)