Adding solutions for all 4 questions from exercise set 2, chapter 1