# Files

## Logistics

• Due: Thursday, June 4th no later than 5pm.
• Submission instructions: complete the assigned number of activities in each of the assigned subsections of Chapter 11. You do not need to submit anything to Brightspace.
• Deadline reminder: once this deadline passes, Runestone Interactive will no longer allow you to collect points for completing the activities.

## Key ideas

• Opening a file. Example: qbdata.txt.
• Reading from a file: open(filename, "r")
• Writing to a file: open(filename, "w")
• Closing a file: filevariable.close()
• filevar.readline() - in conjunction with a while loop to read an entire file
• filevar.readlines()
• File writing methods
• filevar.write(some_string)
• Absolute File Paths vs. Relative File Paths

## Assignment

• Complete the required number of activities for each subsection in Files.

• 10 points - the required number of activities were completed for each subsection before the deadline.

This reading assignment will be graded with scores in Brightspace by office hours the following class day.