Work on your own or with a small group. Read each question carefully and think like a computer: check whether a condition is true, follow the instructions in order, and decide what should happen next. Be ready to explain how you figured out your answers.
A conditional is an instruction that does something only when a condition is met. Which sentence is a conditional?
In the rule “If it is raining, carry an umbrella,” carrying an umbrella happens when the condition is true.
A robot follows this rule: “If the button is blue, play a beep.” The button is blue. What should the robot do?
If a robot's rule says, “If the card is green, clap,” and the card is yellow, the robot must clap.
Put these instructions in an order that helps a robot plant a seed:
Cover the seed with soil.
Make a small hole in the soil.
Place the seed in the hole.
A robot starts facing a door. Its steps are: turn right, then move forward. In which direction does it face after the first step?
Match each computer science word to its meaning.
| Draggable item | arrow_right_alt | Ade a ɛne no hyia |
|---|---|---|
Condition | arrow_right_alt | Steps in order |
Algorithm | arrow_right_alt | Something checked as true or false |
Sequence | arrow_right_alt | A rule that depends on a condition |
Conditional | arrow_right_alt | A set of steps to solve a problem |
A robot has two instructions: move forward, then turn left. What does “then” tell the robot?
A program should help a character cross the street safely. Which two instructions use a condition to make a choice?
Which instruction uses an if/then rule?
A robot's rule says, “If the path is blocked, stop.” The path is clear. The robot should stop because of this rule.
In the rule “If the path is blocked, stop,” what is the condition?
Put the robot's instructions in order to get ready for class:
Pick up your notebook.
Put the notebook in your backpack.
Zip the backpack.
Choose the two instructions where the action depends on a condition.
Imagine you are giving instructions to a robot. Write one if/then rule and explain what the robot should do when the condition is true.