Python answers to some questions in the book