exercises from chapters 10 - 14 in Learn to Program