Creating a Text File

This site applies only to CMPT 120 D1 (Burnaby) in Summer 2011. See the other instructors' pages for other sections.

When you are asked to create a "text file" in a lab or assignment, it is because we need answers from you that aren't Python programs. A text file is a file that just contains the ASCII representations of a bunch of characters; they can be read by any text editor. [If you haven't read the section "How Computer Represent Information yet, you probably didn't get that. Don't worry about it.]

You can create a text file in IDLE. Just open a "New Window" like you would when creating a Python program. When you save the file, save it as .txt instead of .py.

save as a .txt file

That's it. Just answer the questions in that file and save it.

Don't submit a Word document or anything else if asked for a text file. It won't be opened (or marked).