Step 8 of 15 · D · Reading and changing
Replacing what's inside
score=100
score = 100. Time for a high score…
Step 1 / 9idle
Sometimes you want the box to hold something different than before.
You can replace the value inside — same box, same name, brand-new value.
Howie pops the lid, the old value floats out, and a fresh value drops in to take its place.
The name on the box does not change — only the value inside changes.
The old value is gone — there is no undo and no history (unless you saved it somewhere else first).
This is how programs change over time — a score goes up, a balance goes down, a status flips from off to on.
You can even use the current value to make the next one — read the old value, add to it, put the result back in the same box.
Check yourself
Quick check
The box named **score** holds 100. You replace its value with 250. What happens to the old 100?
Quick check
Why is replacing a value in a box useful?
