Starting to solve problem 2
Solution for Problem 2