Susan Harkins (401) [Avatar] Offline
#1
Please post errors found in the published version of The Quick Python Book, Third Edition here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
naomi.ceder (134) [Avatar] Offline
#2
The lines 4-5 in the ebook p.80, chapter 6 Strings used string.lowercase, string.uppercase, and string.letters. Those constants exist only in Python 2.7, not available in Python 3.


The section should read:

string.ascii_lowercase contains all lowercase ASCII alphabetic characters; string
.ascii_uppercase contains all ASCII uppercase alphabetic characters; string.ascii_letters contains
all the characters in string.ascii_lowercase] and string.ascii_uppercase.
447665 (9) [Avatar] Offline
#3
"ModuleNotFoundError" rather than "ModuleNoteFoundError" on page 195
447665 (9) [Avatar] Offline
#4
In page 217, chapter 15, the begging sentence, "Inheritance also comes into effect when you attempt to use a method that isn't defined in the base classes but i defined in the superclass." Here based on the context, the author meant to say the " a method that isn't defined in the derived class" (i.e., Circle class). I guess the "base" class always refers to parent class.

Also, in page 215, Listing 15.2, class method, "You can use cls instead of self.__class__ #2. I failed to see what that "self" refers to. The class method is not associated with any class instance.
447665 (9) [Avatar] Offline
#5
In page 224, Fig.15.2, the top level, the second box and the third box seem to me are same, both contains "Superclass class variables". Are they supposed to be the same?
naomi.ceder (134) [Avatar] Offline
#6
Thank you for the corrections!

447665 wrote:In page 217, chapter 15, the begging sentence, "Inheritance also comes into effect when you attempt to use a method that isn't defined in the base classes but i defined in the superclass." Here based on the context, the author meant to say the " a method that isn't defined in the derived class" (i.e., Circle class). I guess the "base" class always refers to parent class.


You're right - "base" is not a good word - it should be "sub classes" or "derived classes".

447665 wrote:Also, in page 215, Listing 15.2, class method, "You can use cls instead of self.__class__ #2. I failed to see what that "self" refers to. The class method is not associated with any class instance.


Absolutely right. That's actually note #3, and it should be removed entirely.
naomi.ceder (134) [Avatar] Offline
#7
447665 wrote:In page 224, Fig.15.2, the top level, the second box and the third box seem to me are same, both contains "Superclass class variables". Are they supposed to be the same?


Well, yeah, kinda... it should make clear that superclass class variables are *readable* from self, but not *writable*.

So I suppose the first box should have "Superclass class variables (read)" and the second should have "Superclass class variables (write)"
447665 (9) [Avatar] Offline
#8
first box should have "Superclass class variables (read)" and the second should have "Superclass class variables (read)"
still look the same?
447665 (9) [Avatar] Offline
#9
On page 165, section 12.2.6, os.path.isdir(os.path.join(path, os.pardir, os.curdir))

Based on the context, is the first argument (i.e. path) supposed to be the last argument for os.path.join?
naomi.ceder (134) [Avatar] Offline
#10
447665 wrote:first box should have "Superclass class variables (read)" and the second should have "Superclass class variables (read)"
still look the same?


Argh... no I meant that second box should have "Superclass class variables (write)"
naomi.ceder (134) [Avatar] Offline
#11
447665 wrote:On page 165, section 12.2.6, os.path.isdir(os.path.join(path, os.pardir, os.curdir))

Based on the context, is the first argument (i.e. path) supposed to be the last argument for os.path.join?


Gah... that's a particularly nonsensical example, sorry. While it's legal, it's not helpful/useful for anything.

This should be changed to :

This example

os.path.isabs(os.path.join(os.pardir, path))

asks whether the parent of path combined with path is an absolute path.
Dai Xu (22) [Avatar] Offline
#12
In page 125, chapter 9, "The wrapped function is called after the decorator function has completed."
Here "The wrapped function" is wrapper_func(*args), and "the decorator function" is decorate(func). So the arrow of 4 should be directed to the last line of example: "hello", isn't it ?
image
naomi.ceder (134) [Avatar] Offline
#13
Thanks for the report!

You're right that cueball 4 is not pointing to the right place.

I guess I'd say it really should point at the 3 last lines, since that includes the call to the wrapped function, what the wrapper does, and what the function itself does. If I have to pick just one line, I might go with the invocation (3rd to last line) or the last line, either one could be justified.

Cheers,
Naomi
Dai Xu (22) [Avatar] Offline
#14
Very thanks.
I did not know how to express the black-ball-4 until I saw your "cueball 4". That great! I got it . You know, my English is so poor.

Also, on page 73, chapter 6, "The previous “Hello World” example produces two string objects, one of which is immediately discarded."
It should be "The previous “Hello World” example produces three string objects, two of which is immediately discarded.", isn't it ?

I found the previous “Hello World” on page 69 :
>>> x = "Hello " + "World"
>>> x
'Hello World'


Best,
DaiXu
naomi.ceder (134) [Avatar] Offline
#15
Yes, you're right - the two separate string constants and the new string object formed by concatenating them make 3, with two discarded.

As I look at it, it seems to me that I should have given the example again, rather than asking readers to search back 4 pages.

Thanks for the report!
Dai Xu (22) [Avatar] Offline
#16
On page 86, chapter 6, "Finally, the print function can be used to print to files as well as console output."
I could not run
>>> print("a", "b", "c", file=open("testfile.txt", "w")
successfully (Windows 10 + Python 3.6.5). I made it using file variables. Because of version of Python?

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#17
There is a missing ) at the end.

It should be fine if it is run in a place where you have write permission if it is:

print("a", "b", "c", file=open("testfile.txt", "w"))

Dai Xu (22) [Avatar] Offline
#18
On page 107, chapter 8, "A block containing a single line may be placed on the same line after the semicolon of a clause of a compound statement:"
Here "semicolon" should be "colon".

Best,
Xu
Dai Xu (22) [Avatar] Offline
#19
naomi.ceder wrote:There is a missing ) at the end.

It should be fine if it is run in a place where you have write permission if it is:

print("a", "b", "c", file=open("testfile.txt", "w"))



It worked ! Please add the ) later.

Thanks,
Xu
naomi.ceder (134) [Avatar] Offline
#20
You are quite right, that should be "colon"

In addition, you can also use a semicolon in place of a line break (although it's NOT recommended):
>>> print("hello"); print("Good bye")
hello
Good bye
Dai Xu (22) [Avatar] Offline
#21
Susan Harkins wrote:An errata list for The Quick Python Book, Third Edition is available at https://manning-content.s3.amazonaws.com/download/6/2c70834-0595-4ecb-aa7f-7d59cca0393f/Cedar_TheQuickPythonBook,TE_err1.html. Thanks to everyone for your great contributions!

Susan Harkins
Errata Editor


Page 73, chapter 6.

I thought it's considerable. Please add it.

Thanks,
Xu
Dai Xu (22) [Avatar] Offline
#22
On page 149, chapter 11, "This book focuses on running Windows from a command prompt or PowerShell."
Here "Windows" should be "Python" ?

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#23
I think I really meant "running Python on Windows from command prompt or PowerShell" smilie

We'll also see about getting the other fix in as well.

Thanks,
Naomi
Dai Xu (22) [Avatar] Offline
#24
On page 165, chapter 12, "asks whether the parent of the parent of path is a directory."
It should be "asks whether the parent of path is a directory" ?

or

The preceding example should be "os.path.isdir(os.path.join(path, os.pardir, ospardir))".

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#25
while that is a legal example, I agree it doesn't make much sense.

To make it better, the code should be:

os.path.isdir(os.path.join(os.pardir, path))


and the text should read:
asks whether path is a directory in the current parent directory.
Dai Xu (22) [Avatar] Offline
#26
On page 166, chapter 12, "On most operating systems, this directory includes variables related to paths-"
Here "directory" should be "dictionary". smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#27
On page 173, chapter 12:
os.path.split(path): "Splits the path into a base and tail (the last element of the path)"
os.path.splitext(path): "Splits the path into a base and a file extension"
&
os.path.basename(path): "Gets the base of the path"


The first 2 "base" is not same as the last one. Though I can understand it, it's better to change a word, isn't it? Base is so similar to basename.

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#28
577047 wrote:On page 166, chapter 12, "On most operating systems, this directory includes variables related to paths-"
Here "directory" should be "dictionary". smilie


Indeed. This is actually a later edit - it started with leaving out "directory" - "this includes" but for clarity "this dictionary includes" is better.
naomi.ceder (134) [Avatar] Offline
#29
577047 wrote:On page 173, chapter 12:
os.path.split(path): "Splits the path into a base and tail (the last element of the path)"
os.path.splitext(path): "Splits the path into a base and a file extension"
&
os.path.basename(path): "Gets the base of the path"


The first 2 "base" is not same as the last one. Though I can understand it, it's better to change a word, isn't it? Base is so similar to basename.


Yes, "basename" is what's used in the Python documentation, so the last one should be "Gets the basename of the path"
Dai Xu (22) [Avatar] Offline
#30
On page 217, chapter 15: "Inheritance also comes into effect when you attempt to use a method that isn’t defined in the base classes but is defined in the superclass. "
Both of "base class" and "superclass" is Shape in the sample.

May I replace "base" with "current", or omit it simply ?

Best
Xu
naomi.ceder (134) [Avatar] Offline
#31
Yes, either works. Personally, I'd say "current class".

Cheers,
Naomi
Dai Xu (22) [Avatar] Offline
#32
On page 226, chapter 15: "Instance C’s namespace contains..."

C should be c. C is the class. smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#33
Yes, quite right. smilie
508065 (1) [Avatar] Offline
#34
On page 31:
for line in f:
print(f)

Should be:
for line in f:
print(line)

The downloadable source code examples also need to be fixed.
naomi.ceder (134) [Avatar] Offline
#35
Yes, you are quite right.

Thanks for the report!

Cheers,
Naomi
Dai Xu (22) [Avatar] Offline
#36
On page 305, chapter 22: "$where date=between <start datetime> and <end datetime>..."

It should be "$where=date between..."

Best,
Xu
Dai Xu (22) [Avatar] Offline
#37
On page 305, chapter 22: "...222015-01-10T12:00:00%22%20and%20%222015-01-10T14:00:00%22'."

It should be "...222015-01-10T12:00:00%22%20and%20%222015-01-10T14:0'0:00%22."

The last single quotation mark has be escaped. smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#38
Thanks!

Yes, where it reads "$where date=between <start datetime> and <end datetime>" it should actually read "$where=date between <start datetime> and <end datetime>,
naomi.ceder (134) [Avatar] Offline
#39
Quite right - last ' should not be there.

Thanks!

577047 wrote:On page 305, chapter 22: "...222015-01-10T12:00:00%22%20and%20%222015-01-10T14:00:00%22'."

It should be "...222015-01-10T12:00:00%22%20and%20%222015-01-10T14:0'0:00%22."

The last single quotation mark has be escaped. smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#40
On page 324, chapter 23: "Create a Table object called data, giving the table’s name in the..."

It should be "Create a Table object called people, ..."

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#41
Absolutely right.

"Create a Table object called data, giving the table’s name in the database," at the bottom of page 324 should read "Create a Table object called people, giving the table’s name in the database,"

Thanks!

577047 wrote:On page 324, chapter 23: "Create a Table object called data, giving the table’s name in the..."

It should be "Create a Table object called people, ..."

Best,
Xu


Dai Xu (22) [Avatar] Offline
#42
On page 340, chapter 24: "click the Run button immediately to the left of the down arrow on the button bar..."

It should be "click the Run button immediately to the right of the down arrow..." smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#43
On page 341, chapter 24: "pandas was created to make manipulating and analyzing tablular or relational data..."

It might be "... and analyzing tabular or relational data..." smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#44
Quite right. This change should be included in the errata.

Thanks!

577047 wrote:On page 340, chapter 24: "click the Run button immediately to the left of the down arrow on the button bar..."

It should be "click the Run button immediately to the right of the down arrow..." smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#45
Thanks for catching that typo! That change will be included in the errata.

Cheers,
Naomi

577047 wrote:On page 341, chapter 24: "pandas was created to make manipulating and analyzing tablular or relational data..."

It might be "... and analyzing tabular or relational data..." smilie

Best,
Xu
263345 (4) [Avatar] Offline
#46
Chapter 11 -> Quick check: scripts and arguments
States -> Use file_input module
Should be -> Use fileinput module

Best, Michael
Dai Xu (22) [Avatar] Offline
#47
On page 356-357, chapter 25: " so you’ll grab those two files first:..... # get inventory and stations files"

The sample codes of section II are redundant. smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#48
On page 357, chapter 25: " If we look at section VII of the readme.txt file we can see that the format of the inventory file is:"

The sentence is not code or sample, so it's font and format should be normal. smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#49
Quite right, on page 148 in the table for the Quick Check "file_input" should read "fileinput"

Thanks for the report!

Cheers,
Naomi

263345 wrote:Chapter 11 -> Quick check: scripts and arguments
States -> Use file_input module
Should be -> Use fileinput module

Best, Michael
naomi.ceder (134) [Avatar] Offline
#50
In this case, I don't think having them repeated is a bad thing...

Thanks for the report!

Cheers,
Naomi

577047 wrote:On page 356-357, chapter 25: " so you’ll grab those two files first:..... # get inventory and stations files"

The sample codes of section II are redundant. smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#51
Quite right - on p 357 " If we look at section VII of the readme.txt file we can see that the format of the inventory file is:" should be formatted as normal text.

Thanks!
Naomi


577047 wrote:On page 357, chapter 25: " If we look at section VII of the readme.txt file we can see that the format of the inventory file is:"

The sentence is not code or sample, so it's font and format should be normal. smilie

Best,
Xu
263345 (4) [Avatar] Offline
#52
Section 15.8 has the following code in the Circle class:

def __init__(self, r=1, x=0, y=0):
    super().__init__(x, y)
    self.radius = r
    all_circles.append(self)


To access all_circles from the __init__ method I believe you need something like:
self.__class__.all_circles.append(self)
or could technically use
self.all_circles.append(self)

naomi.ceder (134) [Avatar] Offline
#53
Yeah, somewhere on the way to production that got changed. If you look in the source code samples for Ch 15, you'll see it the way I intended (the way that line of code should read):

__class__.all_circles.append(self)


So in real code I probably would have written a class method to take care of something like this, rather than using __class__ or (as you suggest) self.__class__

Thanks for reporting this!

Cheers,
Naomi

263345 wrote:Section 15.8 has the following code in the Circle class:

def __init__(self, r=1, x=0, y=0):
    super().__init__(x, y)
    self.radius = r
    all_circles.append(self)


To access all_circles from the __init__ method I believe you need something like:
self.__class__.all_circles.append(self)
or could technically use
self.all_circles.append(self)

263345 (4) [Avatar] Offline
#54
Thanks again for creating such a wonderful book! I found a small detail that I thought I'd send in.

P.286 Section 18.3.1
Text states:
You’ll have noticed that all the directories in your package—mathproj, mathproj/ comp, and mathproj/numeric

Perhaps a tad clearer to say?
You’ll have noticed that all the directories in your package—mathproj, mathproj/ comp, and mathproj/comp/numeric
naomi.ceder (134) [Avatar] Offline
#55
Thank you!

Yes, you are quite right - the first sentence of 18.3.1 should begin with
You’ll have noticed that all the directories in your package—mathproj, mathproj/ comp, and mathproj/comp/numeric


Thanks for reporting that!

Cheers,
Naomi

263345 wrote:Thanks again for creating such a wonderful book! I found a small detail that I thought I'd send in.

P.286 Section 18.3.1
Text states:
You’ll have noticed that all the directories in your package—mathproj, mathproj/ comp, and mathproj/numeric

Perhaps a tad clearer to say?
You’ll have noticed that all the directories in your package—mathproj, mathproj/ comp, and mathproj/comp/numeric
Dai Xu (22) [Avatar] Offline
#56
On page 376, Appendix A: "... http://barry.warsaw.us/software/STYLEGUIDE.txt. The URL is empty..."

But the URL is not empty! smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#57
We had some confusion about this in editing.

The URL should be https://barry.warsaw.us/software/STYLEGUIDE.txt - in the text we don't have the https, and the final period is part of the URL, which is shouldn't be.

Cheers,
Naomi

577047 wrote:On page 376, Appendix A: "... http://barry.warsaw.us/software/STYLEGUIDE.txt. The URL is empty..."

But the URL is not empty! smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#58
But
https://barry.warsaw.us/software/STYLEGUIDE.txt
and
http://barry.warsaw.us/software/STYLEGUIDE.txt
all can be accessable. The URL is not empty!

And the final period is not problem probably. smilie

naomi.ceder wrote:We had some confusion about this in editing.

The URL should be https://barry.warsaw.us/software/STYLEGUIDE.txt - in the text we don't have the https, and the final period is part of the URL, which is shouldn't be.

Cheers,
Naomi

577047 wrote:On page 376, Appendix A: "... http://barry.warsaw.us/software/STYLEGUIDE.txt. The URL is empty..."

But the URL is not empty! smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#59
Sorry I wasn't clear - at the time we went to press the URL was NOT working, so the editor added the comment about being empty, which it was 9 months ago. We left the link in because we hoped it would be back online, and it is. smilie

The period was not the problem, but it still should not be part of the URL.

Cheers,
Naomi

577047 wrote:But
https://barry.warsaw.us/software/STYLEGUIDE.txt
and
http://barry.warsaw.us/software/STYLEGUIDE.txt
all can be accessable. The URL is not empty!

And the final period is not problem probably. smilie

naomi.ceder wrote:We had some confusion about this in editing.

The URL should be https://barry.warsaw.us/software/STYLEGUIDE.txt - in the text we don't have the https, and the final period is part of the URL, which is shouldn't be.

Cheers,
Naomi

577047 wrote:On page 376, Appendix A: "... http://barry.warsaw.us/software/STYLEGUIDE.txt. The URL is empty..."

But the URL is not empty! smilie

Best,
Xu
Dai Xu (22) [Avatar] Offline
#60
On page 413, Appendix B: "QUICK CHECK: CONTEXT MANAGERS..."

There is no answer! Though I think D is the best one. smilie

Best,
Xu
naomi.ceder (134) [Avatar] Offline
#61
You are quite correct, sir! smilie D is the balance between too many and too few. smilie

Cheers,
Naomi

577047 wrote:On page 413, Appendix B: "QUICK CHECK: CONTEXT MANAGERS..."

There is no answer! Though I think D is the best one. smilie

Best,
Xu
Robert Livingston (2) [Avatar] Offline
#62
We can use the [] special characters defined in the previous section to define a pattern that defines only name characters:

[-a-zA-z]


This pattern will match …


Should this not be:

[-a-zA-Z]
naomi.ceder (134) [Avatar] Offline
#63
You are absolutely right - the last "z" should be uppercase, "Z"

Thanks for the report.

Cheers,
Naomi

146540 wrote:
We can use the [] special characters defined in the previous section to define a pattern that defines only name characters:

[-a-zA-z]


This pattern will match …


Should this not be:

[-a-zA-Z]
Robert Livingston (2) [Avatar] Offline
#64
B.2. Chapter 5
Quick Check: len()
What would len ( ) return for each of the following : [ 0 ] ;
[]; [[1, 3, [4, 5], 6], 7]?
len([0]) - 1
len([]) - 0
len([[1, 3, [4, 5], 6], 7 s]) - 2
( [ 1, 3 , [ 4 , 5 ] , 6 ] is a list and a single item in the list
before the second item, 7.


There seems to be a spurious "s" in the line: len([[1, 3, [4, 5], 6], 7 s]) - 2
naomi.ceder (134) [Avatar] Offline
#65
Quite right. The "s" you flagged should be removed.

Thanks for the report!

Cheers,
Naomi

Robert Livingston wrote:
B.2. Chapter 5
Quick Check: len()
What would len ( ) return for each of the following : [ 0 ] ;
[]; [[1, 3, [4, 5], 6], 7]?
len([0]) - 1
len([]) - 0
len([[1, 3, [4, 5], 6], 7 s]) - 2
( [ 1, 3 , [ 4 , 5 ] , 6 ] is a list and a single item in the list
before the second item, 7.


There seems to be a spurious "s" in the line: len([[1, 3, [4, 5], 6], 7 s]) - 2
172894 (1) [Avatar] Offline
#66
Page 14: "Exiting the interactive shell": Maybe it's clearer for a beginner to mention that on Windows you have to press Enter after pressing Ctrl-Z? (Because on Linux no Enter is necessary.)

Page 18: Last para. before Summary: The sentence "Unlike dir, both globals and locals show..." is repeated unnecessarily.
naomi.ceder (134) [Avatar] Offline
#67
Makes sense - on Page 14: "Exiting the interactive shell" should read "... press Ctrl-Z <ENTER> (if you’re on Windows)..."

Thanks for the suggestion!

For page 18: last para before summary, first sentence "Unlike dir, both globals and locals..." can be removed.

Thanks for pointing that out!

Cheers,
Naomi

172894 wrote:Page 14: "Exiting the interactive shell": Maybe it's clearer for a beginner to mention that on Windows you have to press Enter after pressing Ctrl-Z? (Because on Linux no Enter is necessary.)

Page 18: Last para. before Summary: The sentence "Unlike dir, both globals and locals show..." is repeated unnecessarily.
460585 (2) [Avatar] Offline
#68
Hi,

Love this book! But I found that in your solution to the "Try This" section on page 104, for the last "try" you're missing the 'neutral' option.

Thank you!
naomi.ceder (134) [Avatar] Offline
#69
Thanks for the kind words!

I'm sorry - I'm not seeing a Try This on p 104 in my copy... could you please give me a chapter and section number?

Thanks,
Naomi

460585 wrote:Hi,

Love this book! But I found that in your solution to the "Try This" section on page 104, for the last "try" you're missing the 'neutral' option.

Thank you!
460585 (2) [Avatar] Offline
#70
It's a chapter 8, section 8.3.6:
"What code would you use to print 'very low' if the value of x is below -5 (...)" solution to this is missing 'neutral'

Thanks,
Tomasz

naomi.ceder wrote:Thanks for the kind words!

I'm sorry - I'm not seeing a Try This on p 104 in my copy... could you please give me a chapter and section number?

Thanks,
Naomi

460585 wrote:Hi,

Love this book! But I found that in your solution to the "Try This" section on page 104, for the last "try" you're missing the 'neutral' option.

Thank you!
naomi.ceder (134) [Avatar] Offline
#71
Ah, got it, thanks! It was there all along, I just missed it when scanning the page.

You're right! The solution (which is at the top of p 402 for me) should be:


if x < -5:
    print("very low")
elif x < 0:
    print("low")
elif x == 0:   # could be 'elif not x:' but the point here is comparison to 0 
    print("neutral")
elif x <= 5:
    print("high")
else:
    print("very high")


Thanks for the report and follow-up!

Cheers,
Naomi
Susan Harkins (401) [Avatar] Offline
#72
An updated errata list for The Quick Python Book, Third Edition is available at https://manning-content.s3.amazonaws.com/download/a/3721236-33cb-425a-ac9a-5e00fb264535/Cedar_TheQuickPythonBook,TE_err4.html. Thank you for participating in the collection process. Your contributions are a great help to us and other readers.

Regards,
Susan Harkins
Errata Editor
YuryB (4) [Avatar] Offline
#73
Page 67, Lab 5. Typos in the code to read the file:
1. Float() to be used instead of int()
2. Missing ending parentheses in the last line
naomi.ceder (134) [Avatar] Offline
#74
Thanks for the report.

Yes, you are right the code for lab 5 on page 67 should be:
temperatures = []
   with open('lab_05.txt') as infile:
        for row in infile:
           temperatures.append(float(row.strip()))



YuryB wrote:Page 67, Lab 5. Typos in the code to read the file:
1. Float() to be used instead of int()
2. Missing ending parentheses in the last line