The code in the book seems to use QISKit 0.5 or earlier. Starting in 0.6, the class QuantumProgram was deprecated. Because programs in the book and in this repository use QuantumProgram, the code throws errors.
It would be nice if the code could be updated to work with the most recent version of QISKit, especially since this is such a new book.