assignment 2 problem 1 a-d