loops — predict the output7 / 9
enumerate and zip — the loops ai writes when it's not lazy
Claude wrote a loop that pairs names with roles, but roles has
one fewer entry than names, so riley is silently dropped from the
output. The script should still print three lines — for any name with
no matching role, print name: unknown.
Replace the zip call so missing roles fall back to "unknown".
Expected output:
maya: founder
marcus: eng
riley: unknown
The break is on line 6 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _