Scratch ConditionalsIf Then, If Else & Nested Logic
Learn how to make your Scratch projects smart and reactive. Use conditionals to detect collisions, handle win/lose states, and build real game logic — step by step.
What is a Conditional?
🔀 What is a Conditional?
Imagine a traffic light. When it's green, you go. When it's red, you stop. The light makes a decision based on a condition. In Scratch, conditional blocks do exactly the same thing — they check whether something is true, and only run blocks if it is.
✅ Without a conditional (always runs)
when flag clicked
say [You win!] — runs every time, even score = 0!
✅ With a conditional (smart!)
when flag clicked
if <score = 10> then
say [You win!]
end — only says it when score is 10
🧠 Key Idea — Boolean conditions
Every conditional needs a condition — something that is either true or false. In Scratch, conditions are diamond-shaped blocks called Booleans. Examples:
<touching edge?>→ true or false<key [space] pressed?>→ true or false<(score) > (5)>→ true or false
🌍 Real-world analogies
🚦
Traffic light
If green → go. If red → stop.
🌡️
Thermostat
If temp < 20°C → turn on heater.
🎮
Video game
If lives = 0 → show Game Over screen.
✅
If Then
Do something when true
🔀
If Else
Choose between two actions
🪆
Nested If
Check multiple conditions
Conditional Simulator
Experiment with conditions and see how Scratch makes decisions!
Condition: Score > 10
Will the code inside IF run?
The IF block checks the condition first.
If it is TRUE, the blocks inside run.
If it is FALSE, the blocks are skipped.

touching [ 🍎 Apple ] ?
Pending...
Execution done
The condition was TRUE! Since the Cat is touching the Apple, Scratch ran the blocks inside the IF.
Condition Explorer

Great job! You explored all conditions!
Go Further with Live 1-on-1 Scratch Tutors
Worksheets are great — but live mentorship accelerates learning 10×. Join our Scratch Programming Course for Kids and build 20+ real games & animations with expert guidance.