Added solution to question 6 in chapter 1