Problem Set 8 - Due Tue Apr 12 at 23:00
Reading
- Slides and notebooks from Lec 13 (List Comprehensions & Sorting) Lec 14 (Testing and Debugging), Lec 15 (File Input/Output) Lec 17 (Intro to Dictionaries) and Lec 18 (Dictionary Accumulation Patterns).
- Problems and solutions from Lab 8 (Tracing & Files) and Lab 9 (Dictionaries).
- Think Python, Chapter 11 covers dictionaries.
- The Path to Programming, Unit 5 is a 10-minute podcast covering dictionaries.
Tasks
The instructions for each task:
-
Task 1: Checklist — Define an API to use dictionaries as checklists. This is an individual task.
- Task 2: Predictive Text — Write a program that uses dictionaries to predict the next word based on a list of words previously typed. For this problem, having a partner is optional but recommended.
About this Problem Set
This problem set will give you practice with dictionaries. It will also
review some material on sorting, testing with optimism
, and file
input/output that you've seen in previous labs and lectures.
If you want to find a partner to work with for this problem set, use this Google Sheet to do so.
Reminders
- Remember to download the starter code for each task from the Potluck server.
- You can also use the server to take a 24-hour extension on this problem set if you need to.
- You should check the rubric for each task before you submit.
Time Estimate
Our per-task estimate for this pset is 2-4 hours, and our estimate for total time spent across all tasks is 5–8 hours, plus up to an hour of reading.
How to turn in this Problem Set
-
Upload your tasks via the Potluck server by the deadline (Tue Apr 12 at 23:00).
- For checklist, submit
checklist.py
. - For predictText, each team member must submit
predictText.py
.
- For checklist, submit
-
Double-check the status of your submitted tasks, since there may be warnings.
-
Reminder: you can submit as many times as you like, and only the most recent submission will count for your grade.
-
If you run into trouble with the submissions server, contact Prof. Mawhorter, and include a copy of the file(s) you were trying to submit.
- After the deadline, check your score for each task and submit revisions if you need to.