Alright, so this code worked and I was able to pass this part of the lesson. I went back to reference it and it didn't have the green bookmark by the lesson title. I hit Save & Sumbit Code and now I am getting this error:
Oops, try again. Sorry, but I'm gonna need you to refresh the page! Don't worry your code is saved.
And the console says;
Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'text.txt'
I refreshed, rebooted, and tried the lesson on seperate computers and different browsers on each computer.
"text.txt" is defined and made available for me to use. It is made part of this lesson and is another tab.
If there is a work around of this, it will make me upset because I entered the code exatly how the lesson told me too. What is the issue?
my_file = open('text.txt', "r") print my_file.readline() print my_file.readline() print my_file.readline() my_file.close()