Secondary • Python

Loop Tracer

Follow every iteration. Catch the off-by-one mistakes.

Round 1/6 Score: 0

Trace the loop

Iteration diagram

Loop flow

Start Loop test Body True False → end

The test decides whether another iteration happens.

Your challenge

Live plot

The idea

for: Python's range(start, stop, step) excludes stop. while: test the condition before each iteration. Accumulator: a variable keeps a running total. Trace values after each completed iteration.

Tracing complete!