← Back to demo
Warm-up Coding Find and fix the bug

Bad loop

10 pts Author: (O)
Fix the while loop: for an integer n ≥ 0, return numbers from n down to 1, excluding zero. Return [] for n=0.

Sign in to solve this challenge — an account is free. The demo works without one.

All puzzles are free. An account unlocks the full catalog, saved progress and points.