exercises and notes from "Learn to Program" by Chris Pine