"Flag every account inactive 90+ days" — a standard offboarding/compliance check. Ten labs on Module 9 — argparse, datetime, env vars — over the real fixture's login timestamps.
--days FlagBuild a parser with --days (type int, default 90). Parse ["--days", "60"]. Print args.days.
60Using the same parser, parse an empty list [] (no flag given). Print args.days.
90Parse USERS[0]'s (Julio) lastLogin with datetime.fromisoformat(). Print the result.
2026-07-24 09:14:00+00:00Using a fixed reference of datetime.fromisoformat("2026-07-26T00:00:00+00:00"), compute how many days ago Julio logged in. Print .days.
1None CaseWrite days_since(user) that returns None if lastLogin is None, otherwise the day count from Lab 4's math. Call it on USERS[3] (Dana), then USERS[0] (Julio).
None then 1Loop all USERS, using days_since(), skipping Dana (whose result is None). Print "FIRSTNAME: N days" for the other 11.
Build a list of first names of every user where days_since(u) is not None and greater than 90. Print the list.
['Bina', 'Tri', 'Rosa', 'Pat']Print os.environ.get("AUDIT_TOKEN", "not set") — this variable isn't set on your system, and this script never actually calls a real API, but reading a token this way is the correct habit either way.
not setWrite stale_accounts(users, days) combining Labs 5 and 7 — returns a list of first names inactive longer than days. Call it with 90, then with 30.
['Bina', 'Tri', 'Rosa', 'Pat'] then ['Bina', 'Tri', 'Layla', 'Rosa', 'Yuki', 'Pat']Parse --days (default 90) with a hardcoded arg list ["--days", "90"]. Call stale_accounts() with the parsed threshold. Print "Stale accounts (inactive N+ days): COUNT", then every name on its own line.
Stale accounts (inactive 90+ days): 4BinaTriRosaPat
Open problems/tier07_stale_login_reporter.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.