Skip to main content

Guided Lab: Study Session Tracker

Download the lab, extract it and open the programming-basics folder in your editor. The archive has a README, starter, example CLI, checks and a separate calibration solution.

  1. Run python3 --version, then python3 check.py starter. The initial NotImplementedError is expected.
  2. Implement parsing. Start with one valid value, then several, then blank and invalid input. Before changing code, predict the result of "1,240", "0", "10," and "20,20".
  3. Implement summary using a loop and a fresh dictionary. Add a test that the input is unchanged.
  4. Implement saving and loading using Lesson 5. Validate the loaded data; only a missing file means an empty history.
  5. Run all supplied checks. Read the first failing assertion, repair one issue and rerun.
  6. Run python3 cli.py starter sessions.json "25,15", then the same command with "20". On a fresh history the second run reports count 3, total 60, longest 25.
  7. Try invalid input and malformed saved JSON. Confirm that rejection leaves the existing file untouched.
  8. Add your own tests and complete the assessment.

Expected evidence: implementation, test transcript, two-run CLI transcript, a debugging note and a short explanation of input → validation → calculation → storage → output. Keep data temporary: this lab deliberately excludes concurrent access and crash-safe storage.

Use reference.py only after your attempt, then explain differences. The downloadable checks do not grade originality, explanations or transfer; the rubric does.

Design and diagnosis continuation​

Complete the clinic after the original tracker. Its 8–12 hours are included in the revised module allowance; reuse the same evidence packet. Pilot and retention record defines the later checks.