Teaching article

Toggle and set-on are different instructions

Track a defined object's current state after each action.

Use a two-sided light card and a visible starting state. Toggle depends on what the card currently shows, so two toggles can restore the start while two set-on commands describe a different process.

Two toggles return the card to its starting state.

Track state after each action

Use a visible initial-state marker. Commands that depend on current state cannot be interpreted reliably when that starting information is missing.

Set the initial state. Apply a toggle. Record the new state.

Which command depends on current state? Use tactile state markers.

Toggle differs from set-on.

Resources

Further reading

Read next

Explore Coding and computational thinking. Browse all teaching articles.