Loops + Conditionals Together: Robotics lesson for kids

In “Loops + Conditionals Together”, children learn about if wall ahead, turn (no loop); repeat: if wall ahead, turn.

if wall ahead, turn (no loop): On its own, this checks ONCE — the moment the program reaches it — then moves on, whether or not a wall shows up later.

repeat: if wall ahead, turn: Every time through the loop, the robot samples its sensor, decides using the condition, and acts once — then loops back and does it again for the next wall.

This lesson is part of Engineer in Robotics at Pearls Valley Academy — Sensing & deciding.

Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.