if < > then / else — Scratch Block Guide
Runs the first branch when true, or the second ("else") branch when false—never both.
What this block does
Runs the first branch when true, or the second ("else") branch when false—never both.
Quiz answer checking, toggling pause/play, or switching between ground and air physics.
- Category: Control Blocks
- Key tip: Nesting another if-else inside "else" lets you handle 3 or more mutually exclusive grades/states.
Working Scratch example
Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.
- When green flag clicked
- If (answer) = (4) then
- Say Correct! for 2 seconds
- Else
- Say Try again! for 2 seconds
Try it: Gives immediate right or wrong feedback.
Related block guides
Explore other blocks in the same category or return to the full English Block Dictionary.
FAQ
When should I use "if < > then / else" in Scratch?
Quiz answer checking, toggling pause/play, or switching between ground and air physics. Nesting another if-else inside "else" lets you handle 3 or more mutually exclusive grades/states.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.