Python for Everyone, 3rd Edition
On the copyright page (facing the first page of the Preface), there is a printing history of the book. The printing history is a row of numbers that—at the 1st printing—looks like this:
10 9 8 7 6 5 4 3 2 1
At each subsequent printing, one number is removed from the end of this row of numbers to indicate which printing of the book you have. For example, the last number in the row of numbers in the 2nd printing is 2, and so on. In the list below, [n] means that an error is fixed in the nth printing.
total = total - 1to
total = total - i
g
function below line 21:
return bThe entire program should read:
a = 0 b = 5 def main() : global a global b i = 10 b = g(i) print(a + b + i) def f(i) : n = 0 while n * n <= i : n = n + 1 return n - 1 def g(a) : b = 0 for n in range(a) : i = f(n) b = b + i return b main()
counts
table:
counts = [ [ 0, 3, 0 ], [ 0, 0, 1 ], [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 0, 1 ], [ 3, 1, 1 ], [ 0, 1, 0 ], [ 1, 0, 1 ] ]
if offset > LETTERS :to
if offset >= LETTERS :
"http://horstmann.com/index.html"to
"http://horstmann.com/python4everyone/sample.html"(Why the change? As it happens, page at the former URL uses single quotes for images—see Exercise P7.49.)
Thanks to Sandro Doro, Minglu Gu, MingShan Su, Ben Stephenson, Virginia Tice, and (your name might go here) for their bug reports and suggestions
Please use this form to report any bugs that you find. Please check the list of known bugs first before you report a bug. Unfortunately,we do not have the time to respond personally to every report, but we do read them all and will post updates to this page. Thank you!