Learn to program, exercises in section 5.6