Best afterA comparison is a yes/no value

Choosing one branch with if / else

Two back-to-back if statements are two independent decisions — both can run. When you meant 'do one or the other', that's a bug, and the last branch silently wins. Watch grade get set, then overwritten.

Grade a score of 85: 'distinction' for 80 and up, otherwise 'pass' for 50 and up.

Two ifs both run execution-derived · CPython
variables
state after line 1 runs
variablevalue
score85
step 1 / 5

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

What you are looking at

Watch grade: it's set once, then changed again.

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