hello friends, I want to know whether my code is really correct.I am getting the error message in output window but.codecademy system is allowing it
following is my code:
my_list = [i**2 for i in range(1,11)] my_file = open("output.txt", "r+") # Add your code below! for x in my_list: my_file.write(str(x)+'\n') my_file.close()
This is the error message
Traceback (most recent call last): File "python", line 3, in <module> IOError: [Errno 2] No such file or directory: 'output.txt'