Solved exercises  from chapter 1 to 6