NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

if < > then / else — Scratch Block Guide

📌 What you will learn

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.

Example using if < > then / else
  1. When green flag clicked
  2. If (answer) = (4) then
  3. Say Correct! for 2 seconds
  4. Else
  5. 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.

Back to Control Blocks See the overview and patterns for Control Blocks. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

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.