I/O exercise does not work



In the 5th exercise of Unit 12 of Python is requested to open a file named text.txt and use the method readline() three times.
But when I execute my code (even with the open() sentence only) I got the following message:

Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'text.txt'

my_file = open("text.txt","r")
print my_file.readline()
print my_file.readline()
print my_file.readline()

I've got a similar problem in the 6th exercise of Unit 12 of Python.

Does anyone know what the problem is and what can I do to fix it?


yo tengo el mismo problema


For the record:
I re-visited the Unit 12 of Python and tried the 5th exercise again today (with the same code). It worked. But the 6th is still not running.