Fibonacci Sequence

Generate the first N numbers of the Fibonacci sequence where each number is the sum of the two preceding ones.

Code

Algorithms
fib = [0, 1]
for i in range(2, n): fib.append(fib[i-1] + fib[i-2])
return fib[:n]

Parameters

Number of Fibonacci numbers to generate

Server

More Python Snippets