exercises from chris pine's book, learn to program