exercises from Chris Pine's "Learn to Program"