I've been messing with this for a while now, and have attempted to troubleshoot this any way I can based upon posts made by other users. This includes editing my code, refreshing the lesson, resetting the code, and trying to get the code to work in both Firefox and Chrome.
As far as I know, my code is exactly how it's supposed to be:
my_list = [i**2 for i in range(1,11)] my_file = open("output.txt", "r+") # Add your code below! for item in my_list: my_file.write(str(item) + "\n") my_file.close()
And, although I pass the lesson, this error appears in the console window:
Traceback (most recent call last): File "python", line 3, in <module> IOError: [Errno 2] No such file or directory: 'output.txt'
If I could run the script on my own computer, I would, but I can't seem to get python scripts from Notepad++ to work properly on my computer (this is a separate issue altogether. I am hoping that there is a way around this, but sense that it is a bug and may just have to move on to the next lesson. Any help is greatly appreciated.