Exercises from section 5.6 in Pine's Learn to Program