The last expression of Session 3.4 should be name[len(name)-1] not name[len(name)]. name[len(name)] generates a range error because the length of the string is 1 past the end of the string.
Showing posts with label Chapter 3. Show all posts
Showing posts with label Chapter 3. Show all posts
Wednesday, September 23, 2009
Tuesday, March 3, 2009
Chapter 3 -- Listing 3.12 Vignere cipher
Line 5 of Listing 3.12 contains the statement charNum = 0. The variable charNum is not used anywhere in the encryptVignere function and the line is not needed.
Line 2 is also extraneous. It contains the template docstring for the encryptVignere function.
Line 2 is also extraneous. It contains the template docstring for the encryptVignere function.
Subscribe to:
Posts (Atom)