5. Counting with Dictionaries

Tallying with counts[x] = counts.get(x, 0) + 1

Dictionaries are perfect for counting: one key per thing, and add 1 every time you see it. After the loop, the dictionary holds every count.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:Count the letters of "banana". Play snare(1, counts["a"]) and kick(counts["n"]).

Goal
snare
kick
1234