Understand the idea
An if/else instruction selects one branch when it runs. Check the current situation each time.
WORKED EXAMPLE
At (1,0), a wall occupies (2,0). If right is clear move Right; else move Down. The robot reaches (1,1).
Watch it step by step
Step 1 of 4Start
Begin at (0,0); wall at (2,0).
Choose Play to advance steps automatically.
Read or choose any step
- Start
Begin at (0,0); wall at (2,0).
- Approach
Move Right to (1,0).
- Check
The next square right contains the wall.
- Else
Move Down to (1,1).
TRY BEFORE CHECKING
Exercises with feedback
MAKE SOMETHING YOU CAN EXPLAIN
Your practical challenge
Draw the two branches and trace one clear-square case and one blocked case.
These ticks are your self-review. They do not automatically assess project quality. Ask an adult or partner to review what you can show.
Use the skill in a new situation
Describe what happens if Down is also blocked.