Practice · Python

Practice Recursion (Gentle)

Write simple recursive functions with a clear base case and a shrinking argument.

Recursion (Gentle)warming python…

Space Countdown

Write a function space_countdown(n) that receives a non‑negative integer n and returns a list counting down from n to 0 (inclusive) using recursion. For example, space_countdown(3) should return [3, 2, 1, 0] and space_countdown(0) should return [0].

Press Run to see output, or Check to grade against the tests.

Want a whole course built around recursion (gentle)?

Start my path — free

Adaptive practice, streaks, projects with real code review. Free tier gates AI help, never content.

Practice Python: Recursion (Gentle) — CodeArcade