exercises from the book Learn To Program (Chris Pine)