Skip to course content
Free course

Python Foundations / Module 3 / Applied Checkpoint: Model a Small Course Dataset

Module 3 lesson

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:

CodeTitleHoursStatusTags
AI-01AI Foundations8availableai, beginner
PY-01Python Foundations32availablepython, beginner
ML-01Machine Learning Foundations40availablemachine-learning, intermediate

Required actions

  1. Create each dictionary with the required types.
  2. Place the dictionaries in a list in the supplied order.
  3. Retrieve and print the second course title.
  4. Retrieve and print the first tag of the third course.
  5. Create a separate list containing the three hour values and calculate count, total, minimum, and maximum.
  6. Create a set containing the three statuses and print a sorted display list.
  7. Make a shallow copy of the second course dictionary named working_course.
  8. Change working_course["status"] to "in-production" without changing the source record.
  9. Create a separate copied tag tuple for the working record by adding "notebook" through tuple concatenation.
  10. 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

CriterionNot yetMeets
ShapeRecords use unclear positions or inconsistent fieldsList, dictionaries, scalar fields, and tag tuples match the specification
AccessRequired fields are missing or retrieved from the wrong pathNested indexes and keys return the required title and tag
SummaryHour results are missing or incorrectCount, total, minimum, and maximum are correct
UniquenessDuplicate statuses remain or display order is unstableA set represents unique statuses and a sorted list displays them
CopyingThe source second record changesWorking status and tags change while source values remain unchanged
ReasoningStructure choices are not explainedEvery requested structure has a task-based justification
ReproducibilityClean rerun fails or depends on old stateRestart-and-run-all succeeds and comparisons confirm source preservation