← Previous Next →

The Fibonacci sequence

Created by Julien Palard

Instructions

Provide a function that prints the n first numbers of the fibonacci sequence.

Name your function fibonacci and take a single parameter, say n.

Your function should return a list of n values from the sequence.

Examples

>>> fibonacci(2)
[1, 1]
>>> fibonacci(5)
[1, 1, 2, 3, 5]