A robot does EXACTLY what its program says — built from a sequence of steps, loops that repeat, and IF/THEN decisions.
🧩Build a Program: Steps, Then a Loop
The robot reads the blocks one after another. The loop lets 1 block do the work of 4 — and it lands on the 🎯 goal.
📋 Sequence
Steps in order, top to bottom. Swap two steps and the robot ends up somewhere totally different!
🔁 Loop
A repeat block. Instead of writing "move" 4 times, you write it once and say ×4.
🔀 IF / THEN
A choice. The robot checks a sensor and picks a path — only doing the step if something is true.
🔀Making a Decision: IF / THEN / ELSE
IF = the question (a true-or-false test of a sensor).
THEN = what to do when the answer is YES (true).
ELSE = the backup plan when the answer is NO (false).
It checks again and again, so the robot reacts the instant it bumps something.
🏠In Real Life: a Robot Vacuum
🏠 Same three ideas, real machine
📋Sequence: drive straight, vacuuming as it goes.
🔁Loop: repeat "clean a strip" until the whole floor is done.
🔀IF/THEN:if the bump sensor hits the couch, then turn — else keep going.
🔑Key Terms
🗺️AlgorithmA clear, step-by-step plan that solves a problem — like a recipe the robot can follow.
📋SequenceSteps carried out in a set order, one after another, from first to last.
🔁LoopA block that repeats steps — a fixed number of times, or until something becomes true.
🔀Conditional (IF/THEN)A decision: the robot does one thing IF a test is true, and something else (ELSE) if it's false.
💾ProgramThe full set of instructions — sequences, loops, and conditionals — that tells the robot what to do.
🐞DebuggingFinding and fixing the mistakes ("bugs") in a program so the robot behaves the way you want.
⭐Remember: a robot has no common sense — it follows your program EXACTLY. Order your steps carefully, loop to save work, and use IF/THEN so it can react to the world!