Adding solution to homework 3.1
adding the question for hw3.1