Best afterOperator precedence: × before +

Modular arithmetic: wrapping around

Clocks don't count to 15 — they wrap back to 3. That wrap-around is exactly what the remainder operator % does, and it's the same idea behind fixed-width numbers overflowing. Watch the clock with and without it.

It's 10 o'clock. What hour shows on a 12-hour clock 5 hours later? (we want 3).

Forgetting to wrap the clock execution-derived · CPython
variables
state after line 1 runs
variablevalue
start10
step 1 / 2

Click a line, drag the slider, or use the keys.

What you are looking at

Watch clock: does it keep climbing, or wrap back around 12?

Every state you see came from running the program under CPython's tracer at build time — see how GlassBox stays honest.