2. Loop the Grid

Nested loops over rows and columns

Put the drums in a list that lines up with the rows — drums = [hihat, snare, kick] — then a loop over rows with a loop over columns inside plays the whole grid.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:drums = [hihat, snare, kick] and grid has one row per drum. Loop r over range(3) and c over range(4): if grid[r][c] == 1, call drums[r](c + 1).

Goal
hihat
snare
kick
1234