Solutions for part 1 and part 2 question 1.