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.
Sequence (steps in order), loops (repeat), and if-then decisions (conditionals) — together they control everything a robot does.
Sequence, loops, and conditionals are the core of all control flow.
🧪 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").