The example code from Learn to Program.