enumerate and zip — the loops AI writes when it's not lazy — step 9 of 9
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Final drill. Combine enumerate and zip to print a numbered list
where each line shows position, name, and score:
Expected output:
1. maya — 95
2. marcus — 88
3. riley — 71
Hint: enumerate(zip(names, scores), start=1) gives you
(1, ("maya", 95)), (2, ("marcus", 88)), etc.
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Final drill. Combine enumerate and zip to print a numbered list
where each line shows position, name, and score:
Expected output:
1. maya — 95
2. marcus — 88
3. riley — 71
Hint: enumerate(zip(names, scores), start=1) gives you
(1, ("maya", 95)), (2, ("marcus", 88)), etc.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.