Learn to Program Exercise 9