4. Project: Pattern Parser

Reading your own mini-language

Invent a tiny language: "k.s.k.s." means kick, rest, snare, rest… A dictionary called codes maps each letter to a drum, and a loop reads the code one character at a time.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:codes maps letters to drums. For each i, ch in enumerate("k.s.k.s."), if ch is in codes, play codes[ch](i + 1).

Goal
snare
kick
1234
5678