Coding basics · 16 of 20
First n Fibonacci numbers
Return the first n Fibonacci numbers: 0, 1, then each number is the sum of the two before it.
Examples
Input n = 7
Output [0, 1, 1, 2, 3, 5, 8]
Input n = 0
Output []
Coding basics · 16 of 20
Return the first n Fibonacci numbers: 0, 1, then each number is the sum of the two before it.
Input n = 7
Output [0, 1, 1, 2, 3, 5, 8]
Input n = 0
Output []