Added tasks 2 and 6 from chapter 6

Don't know if the 6th task is done correctly.