Fibonacci numbers¶
The Fibonacci numbers are the numbers in the following integer sequence characterized by the fact that every number after the first two is the sum of the two preceding ones:
Here was Kerbez
For example:
[0, 1, 1, 2, 3, 5, 8 …]
We want you write Fibonacci class that realize two implementation:
- Recursive
- Dynamic
### Part-1. Dynamic implementation 1. Look at the file dynamic.py.
Run tests: (you will see that all of them FAILED)
python3 -m unittest tests/dynamic_fibonacci_test.py
Now, implement Fibonacci class, methods in dynamic.py
After running tests all of them should be passed.
Compare your answer with mine located in answers/dynamic_fibonacci.py
### Part-2. Recursive implementation 1. Look at the file brute_force.py. 2. Run tests: (you will see that all of them FAILED)
python3 -m unittest tests/brute_force_fibonacci_test.py
- Now, complete brute_force_fibonacci.py
- After running tests all of them should be passed.
- Compare your answer with mine located in answers/brute_force_fibonacci.py