Sunday, July 27, 2014

Appendix B -- shuffle

The description of the shuffle method in Appendix B is incorrect. shuffle modifies the list in place and returns None, not the shuffled list.

Thursday, April 4, 2013

Session 8.7

The example session on page 284, Session 8.7 has print statements that are missing parenthesis. This will cause a syntax error under Python 3.x For example the first two lines should look like this:

>>> d = neighborCount(text)
>>> print(d['e'])

Other print statements in this session should also have parenthesis.

Wednesday, March 14, 2012

Listing 12.4

In Listing 12.4 the signature for the _draw method in line 19 should include a parameter to reference a turtle, since the turtle is in fact needed by the child classes.

def _draw(self, someTurtle):

Friday, November 19, 2010

New Location for cTurtle and cImage

Luther college changed our content management system, and because of that the link in the book is that points you to cTurtle and cImage is no longer valid. You can still get these resources here:

Friday, November 20, 2009

Chapter 6 -- Page 208 -- Line 9

There is a missing space between __main__ and namespace.

Monday, November 2, 2009

Chapter 4 --Page 140-141 -- Listing 4.7

The values method returns a dict_values object, not a list. However, it can be turned into a list by using the list() function. Line 10 of listing 4.7 should be

countlist = list(countlist.values())

Then the max function is legal on countlist (as shown on line 11).

The text on page 140 should read

Recall that the values() method returns a dict_values object which can be turned into a list by applying the list function.

Monday, September 28, 2009

All Chapters, Source Code for Listings

Here are all the listings for the book: