Solved exercises from 4-17 till 4-30 from chapter 4