Find fibonacci sequence #
Write a function that takes a positive integer as input and returns a list of Fibonacci numbers that are less than or equal to the given number.
Fibonacci numbers are a sequence of numbers starting with 0 and 1 in which each number is the sum of the two preceding ones, e.g. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
Tests #
find_fibonacci(1)should return[0, 1, 1]find_fibonacci(10)should return[0, 1, 1, 2, 3, 5, 8]find_fibonacci(20)should return[0, 1, 1, 2, 3, 5, 8, 13]find_fibonacci(100)should return[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]find_fibonacci(1000)should return[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987]
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules