Assignment02 problem 1