Page 95
At the end of the fourth paragraph, add the following:
Note that when you see __init__ in the code, there are two underscores on either side of 'init'. That's two underscores before and two underscores after, not just one on either side.
Page 111
The code for Question 3 of the "Test yOur knowledge" section should read as follows:
for i in range(5):
for j in range(3):
print '*',
print
Page 152
At the end of the first paragraph (right before the Carter Says), add the following:
It's a little hard to see, but there are two underscores on either side of the 'init'. That's a total of 4 underscores, two on either side.
Page 153
At the end of the fifth paragraph (just before the heading 'What's "self"?', add the sentence:
"All the "magic" methods use two underscores before and two underscores after the name of the method.
Page 161
In the code snippet at the bottom of the page, the line
GameObject.__init__(self)should be
GameObject.__init__(self, "coin")
Page 339
In listing 24.1, in line 10, there is an 'A' at the end of the line
ship_mass = 5000.0
The 'A' should not be there.
Page 385
Answer to Question #5, Chapter 18, should be pygame.USEREVENT instead of pygame.NUMEVENTS
Page 11, Listing 1.2
The second line should read:
secret = random.randint(1, 99)
Page 35
The e-notation graphic
0.00000000000011752 = 1.752e-13should be
0.0000000000001752 = 1.752e-13(an extra '1' was added in typesetting)
Page 48
The sentence:
"Even if the user enters a float, it will get rounded down (chopped off) to an integer."should be deleted.
Page 59, Listing 6.5
The second line should read:
secret = random.randint(1, 99)
Page 74
The second bullet should read,
"those that repeat until a certain thing happens—these are called conditional loops because they keep going as long as some condition is true"
Page 95
At the end of the fourth paragraph, add the following:
Note that when you see __init__ in the code, there are two underscores on either side of 'init'. That's two underscores before and two underscores after, not just one on either side.
Page 111
The code for Question 3 of the "Test yOur knowledge" section should read as follows:
for i in range(5):
for j in range(3):
print '*',
print
Page 119
4th paragraph, the 2nd sentence should read
"A list has square brackets, so for extend(), you could have both round and square brackets."
Page 152
At the end of the first paragraph (right before the Carter Says), add the following:
It's a little hard to see, but there are two underscores on either side of the 'init'. That's a total of 4 underscores, two on either side.
Page 153
At the end of the fifth paragraph (just before the heading 'What's "self"?', add the sentence:
"All the "magic" methods use two underscores before and two underscores after the name of the method.
Page 161
In the code snippet at the bottom of the page, the line
GameObject.__init__(self)should be
GameObject.__init__(self, "coin")
Page 339
In listing 24.1, in line 10, there is an 'A' at the end of the line
ship_mass = 5000.0
The 'A' should not be there.
Page 385
Answer to Question #5, Chapter 18, should be pygame.USEREVENT instead of pygame.NUMEVENTS