Please report an error in the book or bug on the website when you happen to find one. Include your name and we’ll give you a shout-out on this page.
Section 3.5 Common, General Functions; p 104
Jennifer from the UK detected that the variable a was previously not defined in a way that would result in max(a) = 3 or sum(a) = 6.
Intermezzo 3.2 on page 103 defines a = [1, 1, 2, 3, 5, 8]. After appending 13, we would yield max(a) = 13 and sum(a) = 33.
If you did not work through Intermezzo 3.2, variable a was last defined on p. 101 as a = [5, 6, 7, 7, 7, 8, 9, 9] which would yield max(a) = 9 and sum(a) = 58.
Involuntarily, we demonstrated the importance of meaningful variable names as well as the risk of repurposing the same variable name within your script.