Learn to Program Chapter 12 exercises