Assignment1 and Exercise 1.1 of Assignment2