The Fibonacci sequence

Created by Julien Palard

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 an iterable of n values from the sequence.

Examples

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

There's no corrections yet, hit the `Submit` button to send your code to the correction bot.

Keyboard shortcuts:

  • Ctrl-Enter: Send your code to the correction bot.
  • Escape: Get back to the instructions tab.

See solutions