Ages 10–12 · Challenge
Toggle with a reset event
Use the evidence in toggle with a reset event to select and justify a valid solution.
Understand the idea
Program traces follow assignments and expression rules in order.
Your challenge
A mute flag begins false. Events occur: Toggle, Toggle, ResetToFalse, Toggle. What final state follows, and which event makes the earlier toggles irrelevant?
- False; first Toggle
- True; ResetToFalse
- True; second Toggle
How to explore
- Process events in order and distinguish assignment from toggling.
- Compare each proposed response with the complete observation or trace, rather than with only one familiar word.
- Check the selected response against the complete situation, including a case where a tempting alternative fails.
Open the activity to work with its controls and check your reasoning. Progress stays in this browser.
Keep exploring
DON’T LET THE QUESTION END HEREGive that curiosity
Open the learning space