← My dashboard
PUZZLE 005
The attendance loop
Python · Module 1 · for loops · dictionaries+100 XP
Professor Owl
Who never misses a class?
The Academy records attendance as lists of True (present) and False (absent), one per student. Count the days each student attended.
Goal
Build a dictionary present with each student's name and the number of days they attended.
Key facts
- for student, days in attendance.items(): goes through a dictionary
- sum() adds a list; True counts as 1
- present[student] = value stores a result
main.py⏳ Loading Python… (the first time takes a few seconds)
Given (already runs before your code)
What your code produced
Run your code and the result will appear here.
🎯 You solve it when your code produces what the goal asks for.