Best afterOperator precedence: × before +

Powers: ** not ^

Lots of languages and spreadsheets use ^ for 'to the power of'. Python doesn't — ^ is bitwise XOR, and it produces a number with no error to warn you. Watch 2 ^ 3 come out as something surprising.

Raise base (2) to the power of 3 (we want 8).

^ is not 'to the power of' execution-derived · CPython
variables
state after line 1 runs
variablevalue
base2
step 1 / 2

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

What you are looking at

Watch power — the operator is doing something other than what it looks like.

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