Exercise 1
Fibonacci sequence
1, 1, 2, 3, 5, 8, ..... It starts with 1, 1. The n-th item is given using the following equation:
Initiate an empty repo;
Show all branches;
Define a function named
fib()in a new filemake_fibo.pyIt takes an argument n and returns the first n items of the Fibonacci sequence (without using recursion).
Make a commit;
Show all branches;
Make a new branch called
feature;Show all branches;
Switch to the
featurebranch;Show all branches;
Observe any difference from the previous one;
Add a new file called
make_fibo_recur.py;Implement the
fib()using recursion;Make a commit;
Switch to the master branch;
Rename the
featurebranch tonew-branch;Show all branches;
Try delete the
new-branch;Merge the
new-branchinto master;Try delete the
new-branch;
Show all branches;
Last updated