Errata

If you find any typos, please email them to [email protected]. (Apologies in advance if I haven't posted your errata submission yet or failed to give credit. Please email me to correct this.)

Chapter 1 - The Interactive Shell

This interactive shell example:

>>> spam = 15
>>> spam = spam + 5
20

...should be:

>>> spam = 15
>>> spam = spam + 5
>>> spam
20

Chapter 9 - Extending Hangman

Line 105 was difficulty = '', but should be difficulty = 'X' so that the following loop will run at least once. (Thanks to Hadi Khalili)

Chapter 15 - The Reversegam Game

On page 234 and 236 the printScore() function is mistakenly referred to as the showPoints() function. (Thanks to Peng Xu彭旭)