wrote lab1 problem 10