Book 15, Question 128 · Video
Why Do Robot Instructions Use If-Then Rules?
Robot instructions use if-then rules so a robot can make choices when things change! An if-then rule says: if something is true, then do an action. For example, if the light is red
Read the full answer →Watch on YouTubeSee the series on Amazon
What Crafty Clover says in this video
Intro
Hi there, curious minds! I'm Crafty Clover! Let's discover something amazing. Why do robot instructions use if-then rules?
The Big Idea
Robot instructions use if-then rules so a robot can make choices when things change! An if-then rule says: if something is true, then do an action. For example, if the light is red, then stop.
If Something
Step one: if something is true. The robot checks a fact using its sensors, like Is the light red? That check is the if part, and it always has a yes or no answer.
Then Do This
Step two: then do this. If the answer is yes, the robot does the action that goes with it. If the light is red, then stop.
Else Do That
Step three: else do that. Adding else lets the robot choose what to do when the if is not true. If the light is green, go. Otherwise, wait.
A Closer Look
Let's take a closer look! If is the question. Then is the action when the answer is yes. Else is the action when the answer is no. People use it all day: if it's raining, take an umbrella. Robots use lots of these rules together.
Quick Facts
Quick facts! Robots use many if-then rules together to handle different situations. People use if-then thinking all day long. Games and apps are full of if-then rules too. Act out the rules indoors, never near a real street.
Think Like a Scientist
Now, think like a scientist! Write five if-then rules for a robot crossing the street with a grown-up. For example: if the signal shows a red hand, then wait. Act out each rule indoors with a friend. Which rule was your favorite?
Outro
If-then rules help robots make choices. Science is amazing! Crafty Clover can be found on Amazon Books, Google Bookstore, and Apple Books. Available for purchase or download! Bye for now!