Step 2 gives an error

This lesson is kinda messy with the instructions. If you follow it, you’ll be stuck at #2 forever, because you’ll get an SyntaxError: unexpected EOF while parsing. The #2 and #3 should be together or otherwise the code will show a SyntaxError

12 Likes

Yes, actually there are numerous instances in the Python courses, at least, where you are asked to type a line ending in a colon, and then press Run; lacking a second line, this obviously throws an error. Usually it’s a function header, but, like you, I’ve noticed it in this course in the with open() as x: construction.

Anyway, typing pass as the second line will get you past that step.

(It’s also a bit annoying that the parser won’t pass an open() expression containing the ‘r’ mode, since it is the default.)

6 Likes

thank you this helped me