Line 15 refers to a variable k that is undefined in this function. k has been used to denote the number of clusters. Lines 3 and 4 tell us that we are creating 6 clusters of earthquakes. k should be 6 in line 15.
This is the place to find errata and give feedback directly to the authors of the textbook Python Programming in Context.
Nothing drives an author more crazy than to find an error in a listing in his own textbook. However, even after months of testing and several rounds of proofreading bugs still find their way in to the final printed book. We aim to provide warnings and fixes here. Please contact us if you find an error that is not covered on this blog.
No comments:
Post a Comment