Best afterNumbers have types: int vs float
A comparison is a yes/no value
When you compare two values, Python hands back a real True or False — a value you can store and reuse. Watch a comparison become a stored answer, and watch the boundary trip a common off-by-one.
Decide whether someone aged 18 counts as an adult (18 or older) and store the yes/no answer.
> misses the boundary execution-derived · CPython
variables
state after line 1 runs
| variable | value |
|---|---|
age | 18 |
step 1 / 2
Click a line, drag the slider, or use the ← → keys.
What you are looking at
Watch is_adult: a comparison turns into a stored bool.
- Buggy —
is_adult = age > 18withage = 18storesFalse—>excludes 18 itself. The result is a real boolean; the boundary is just wrong. - Procedural —
is_adult = age >= 18storesTrue.>=includes the boundary. Either way, the comparison itself is a yes/no value you can keep.
Every state you see came from running the program under CPython's tracer at build time — see how GlassBox stays honest.