Chapter 4: Conditions · Level 20 of 30

Level 20: Spiral Path

Goal: A long spiral! Teach the robot a rule: if the path ahead is free, move — if not, turn right. ★★★ = 4 blocks or fewer.

▶ Watch how it works

An if block decides: if the path ahead is free, move forward — else turn right.

Got it? Now solve your puzzle ↓ (a different board — work it out yourself!)

Blocks — tap to add

Your program

💡 Need a hint?

Inside “repeat until star”, add “if path ahead”. Put “move forward” in the first part and “turn right” in the else part.

What you learn here

An if block lets the program decide: do one thing when something is true, and another thing when it is not.

Chapter 4 — Conditions: Teach the robot to decide for itself: keep going until the star, and turn only when the path is blocked.

Blocks in this level

Chapter 4 levels