Problem Set 7 - Due Tue Nov 9 at 23:59


  1. Slides and notebooks from Lec 14 (Testing & Debugging), Lec 15 (File Input/Output), and Lec 16 (Directories).
  2. Problems and solutions from Lab 8 (Tracing, Testing, and Files).
  3. Think Python, Appendix A talks about debugging, and Think Python, Chapter 14 covers files; we only discuss sections 14.1-14.5, although section 14.10 is also useful. The textbook does not have a chapter about testing.


The instructions for each task and their specific requirements are laid out on the following pages:

About this Problem Set

This problem set will give you practice with testing and tracing, and file input/output, with a bit of practice on directories and the os module as well.

If you want to find a partner to work with for this problem set, use this Google Sheet to do so.

Note that you may not work with different partners on different tasks in this problem set. If you are working with a partner on one task, you must either work individually or work with that same partner on any other tasks where a partner is allowed.


Time Estimate

To help you plan how long you need to spend on this problem set, we have some guidelines based on how long students spent on these tasks last semester (please fill out your time estimates to help students in future semesters). Note that this semester, due to the large number of new tasks, these numbers are often just estimates.

When you've been working on a task for about 2 hours, you should evaluate whether you are making efficient progress, and make use of some of the class resources available to you, like help-room hours or office hours. If you've been working on one task for 4 hours and still have a ways to go, you should definitely get some help with it.

The entire problem set will probably take you something like 7–10 hours of programming, plus another half hour to hour of reading, although some students take more or less time than that.

We expect that you'll spend 2-4 hours doing research and writeup for the connections topic task.

How to turn in this Problem Set

For task 3, you will not be submitting code. Instead, what you submit depends on your role in your team:

For tasks 1 and 2, you will submit code via the usual mechanism: