Learn to Program, Chapters 6 & 7 exercises