The roster HR asks IT for every quarter. Ten labs on Modules 4-5 — mutability, aliasing, real copies, and the actual 12-person course fixture. Still no loops (that's Tier 4) — every record here is reached by direct indexing.
Using the real USERS fixture, print "FIRSTNAME -- DEPARTMENT" for USERS[0], guarding the department with .get(..., "Unknown").
Julio -- ITTake original = USERS[4] (Kelly). Print original["status"]. Make copy = dict(original), set copy["status"] = "SUSPENDED" (flagging a duplicate record without touching the source). Print original["status"] again, then copy["status"].
ACTIVE, ACTIVE, SUSPENDED — the original is untouched, top-level fields really do copy independentlyalias = USERS[0] — NOT a copy, just a second name for the same dict. Set alias["profile"]["department"] = "Temp". Print USERS[0]["profile"]["department"] — did the "real" record change too? Then set it back to "IT" and print again to confirm the reset.
Temp then IT — alias and USERS[0] are the exact same object; there was never a copyis vs ==Print USERS[0] is USERS[0], then dict(USERS[0]) is USERS[0], then dict(USERS[0]) == USERS[0] — three lines.
True, False, True — a fresh copy is never the SAME object, even when its contents are equalJulio (USERS[0]) and Dana (USERS[3]) are both in IT. Build it_roster = [USERS[0], USERS[3]] and print each one's firstName — two lines, no loop, just direct indexing into your new list.
Julio then DanaPrint USERS[7]'s department, guarded with .get(..., "Unknown") — you already know this record (Layla) is missing the key entirely.
Unknownoriginal = USERS[0]. shallow = dict(original) — looks like a copy. Append a new group to shallow["groups"]. Print len(original["groups"]) then len(shallow["groups"]).
3 then 3 — BOTH changed. dict() only copies the top level; nested lists/dicts (like groups) are still the exact same shared object in both.Print whether USERS[0] and USERS[3] have the same department, then whether USERS[0] and USERS[1] do — two lines.
True then FalseGet USERS[0]'s email, then look up their login count in LOGIN_COUNTS using that email as the key (guard with .get(), default "No login data").
142For USERS[7] (Layla): print a 3-line report entry combining safe department access (Lab 6), a full name, and a login-count join by email (Lab 9) — "Roster entry: FIRST LAST", "Department: ...", "Login count: ...".
Roster entry: Layla HaddadDepartment: UnknownLogin count: 12
Open problems/tier03_department_roster.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.