from gdtest_code_cells import fibonacci
fibonacci(8)[0, 1, 1, 2, 3, 5, 8, 13]
Generate the first n Fibonacci numbers.
Usage
This function demonstrates multiple code blocks: one executable and one with #| eval: false.
n: intHow many Fibonacci numbers to generate.
list[int]The first n Fibonacci numbers.
An executed cell showing output:
A non-executed cell with multiple hash-pipe options: