← Mission map

Mission 4 of 16

Programming Logic & Control Flow

📋 What it is

A robot's "think" step is code: sequences, loops, and if-then decisions that control what it does.

🗣️ Coach says

The THINK step is programming. Three building blocks run every robot brain: SEQUENCE (do steps in order), LOOPS (repeat until done), and IF-THEN decisions ("IF wall ahead, THEN turn"). String these together and you've written the logic that makes a robot behave — no magic, just clear instructions.

🧠 Memory hook

Sequence (in order), loops (repeat), if-then (decide). The robot's whole brain.

😂 Giggle

Why was the robot's code so emotional?
Because it was full of loops and it couldn't break out of its feelings!

😲 Whoa!

The same three ideas — sequence, loops, and if-then — are enough to program ANYTHING a computer or robot does, from a light blink to a Mars landing.

✅ Quick check: Name the three basic building blocks of robot control logic.

Say your answer out loud first — then reveal.

🧪 Try it! (2 minutes)

Write a 3-step "program" in plain words for a robot to follow a wall (e.g. "IF wall on right, go forward, ELSE turn right").

⭐ Do the round to earn your star →
🤸 Brain break: If-then-hop: hop forward on "if clear", turn on "if wall" — control flow in motion.