Completed question1 of homework 1
Solved second question.