Solved exercises from 1 till 23 from chapter 6