Exercises in Chris Pine's book 'Learn to Program'