5. Recursion

Functions that call themselves

A function can call itself — that's recursion. Every recursive function needs a stopping point (the base case) or it would go on forever.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:def down(b): if b < 1, return; otherwise play the hihat on b and call down(b - 2). Call down(8).

Goal
hihat
1234
5678