Applied Checkpoint: Model a Small Course Dataset
Unit ID: M03-U08 Estimated active time: 40-55 minutes
Your task
Represent three fictional courses as a list of dictionaries. Each dictionary must contain:
code: string;title: string;hours: integer;status: string;tags: tuple of strings.
Use these supplied records:
| Code | Title | Hours | Status | Tags |
|---|---|---|---|---|
| AI-01 | AI Foundations | 8 | available | ai, beginner |
| PY-01 | Python Foundations | 32 | available | python, beginner |
| ML-01 | Machine Learning Foundations | 40 | available | machine-learning, intermediate |
Required actions
- Create each dictionary with the required types.
- Place the dictionaries in a list in the supplied order.
- Retrieve and print the second course title.
- Retrieve and print the first tag of the third course.
- Create a separate list containing the three hour values and calculate count, total, minimum, and maximum.
- Create a set containing the three statuses and print a sorted display list.
- Make a shallow copy of the second course dictionary named
working_course. - Change
working_course["status"]to"in-production"without changing the source record. - Create a separate copied tag tuple for the working record by adding
"notebook"through tuple concatenation. - Confirm with comparisons that the source status and source tags remain unchanged.
Explain your structure choices
In a Markdown note, explain:
- why the outer collection is a list;
- why each record is a dictionary;
- why tags use tuples in this exercise;
- why statuses use a set for the uniqueness question; and
- why a working copy is safer than editing the source record.
Required clean-state test
Restart the kernel and run all. Verify the original dataset still contains available and ("python", "beginner") for the second course while the working record contains the changed values.
Self-review rubric
| Criterion | Not yet | Meets |
|---|---|---|
| Shape | Records use unclear positions or inconsistent fields | List, dictionaries, scalar fields, and tag tuples match the specification |
| Access | Required fields are missing or retrieved from the wrong path | Nested indexes and keys return the required title and tag |
| Summary | Hour results are missing or incorrect | Count, total, minimum, and maximum are correct |
| Uniqueness | Duplicate statuses remain or display order is unstable | A set represents unique statuses and a sorted list displays them |
| Copying | The source second record changes | Working status and tags change while source values remain unchanged |
| Reasoning | Structure choices are not explained | Every requested structure has a task-based justification |
| Reproducibility | Clean rerun fails or depends on old state | Restart-and-run-all succeeds and comparisons confirm source preservation |
