How admins turn an admin-console export into something a manager can read. Ten labs on Module 10 — writing an export, reading it back, and generating a formatted report file.
Write the real USERS fixture out to "p1_export.json" using json.dump() — simulating pulling today's export from an admin console.
Read "p1_export.json" back with json.load(). Print len() of the result, then whether it equals the original USERS.
12 then TrueWrite build_department_summary(users) that returns a dict of {department: count}, guarding the missing-department record. Call it on USERS.
{'IT': 3, 'Security': 2, 'Sales': 3, 'Engineering': 3, 'Unknown': 1}Write the summary from Lab 3 to "p4_report.txt", one "DEPT: COUNT" line per department.
Read "p4_report.txt" back and print its contents.
IT: 3Security: 2Sales: 3Engineering: 3Unknown: 1Write the department summary to "p6_report.txt" with "w" mode (fresh each time), then open it AGAIN with "a" mode and append "Generated on: 2026-07-26\n". Read the file back and print it.
Generated on: 2026-07-26Write load_export_safe(path) that reads and returns JSON from a file, returning [] if the file doesn't exist. Call it on "p1_export.json" (print len()), then on "p7_does_not_exist.json" (print the result).
12 then []Call your build_department_summary() from Lab 3 again, this time on data you loaded from a file with load_export_safe() instead of the in-memory fixture. Confirm it produces the same result.
Write USERS to "p9_export.json", read it back, and build the department summary from the re-loaded data — three steps in one script.
{'IT': 3, 'Security': 2, 'Sales': 3, 'Engineering': 3, 'Unknown': 1}Chain everything: write USERS to "p10_export.json" → read it back → build the department summary → write a report to "p10_report.txt" starting with a "Monthly Department Report" header line, then the department lines → read the report file back and print it to confirm.
Monthly Department ReportIT: 3Security: 2Sales: 3Engineering: 3Unknown: 1
Open problems/tier08_monthly_report.py and do all 10 problems locally. Uses fixture.py -- type it in first from DAY1_01_FIXTURE.md if it's not already in this folder. Run python check.py in problems/ to grade everything.