I cant seem to finish Python Lesson 12/05 File Input/Output: Reading Between the Lines.
When I run my code I get the following error in the console:
Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'text.txt'
There is an additional error shown on the bottom of the screen:
Oops, try again. Sorry, but I'm gonna need you to refresh the page! Don't worry your code is saved.
After I reload the page, the same errors pop up.
Here is my code, but i don't think anything should be throwing the error. Any ideas for help?
my_file = open("text.txt", "r") print my_file.readline() print my_file.readline() print my_file.readline() my_file.close()