Tutorpip← About this lessonABCHide the answer keyDownload PDF
Coding · Ages 8+ · Set A
Bo the gardener
Scan to mark
on screen
A
Name
Date
Start Finish
Goal: 15 min
Score/ 12
Remember: An if-then rule has a condition and an action. The action happens only when the condition is true, and is skipped when it is false.

Read and answer

Read the story, then answer.

The soggy flowersMira's clay robot Bo watered the flowers every morning. One gray day Mira was at school, so Bo followed his one rule and watered them. Then rain began to fall, but Bo kept on watering, because his rule did not ask him to check. When Mira came home, the flowers were soggy. Ms. Okoro from robot club helped her write a new rule: if the soil is dry, then water the flowers. The if part is the condition, which Bo checks, and it is either true or false. The then part is the action, and it happens only when the condition is true. Next morning the soil was dry and crumbly, so Bo watered. After a drizzle it was damp, so he skipped the action.
1
Why did Bo water the flowers in the rain?
🌵The soil was dry💦He liked the rain🌧️His rule never asked him to check the soil
2
The if part is the , and it is either true or false.
actionconditionrule
3
After a drizzle, the soil is damp. What does Bo do with the rule in the picture?
He waters the flowersHe skips the action and walks on byHe waters them twice
4
The then part happens even when the condition is false.
TrueFalse
5
Mira's rule is: if it rains, open the umbrella. The day is clear. What happens?
The umbrella opens anywayThe umbrella stays shut and nothing happens, which is fineMira must change the rule
6
A condition can be true one day and false the next.
TrueFalse

Rules, order and fix

7
Join each word to what it means.
  1. 1a condition
  2. 2an action
  3. 3an if-then rule
  • Aan if part and a then part
  • Ba yes or no question Bo checks
  • Cwhat happens when the condition is true
8
Circle the two that are an if part, the condition. (circle every one)
🔔the bell rings🧍line up☔it is raining🌂open the umbrella
9
Bo checks the soil one morning. Put what he does in order.
  • Bo asks: is it dry?
  • Bo waters the flowers
  • The answer is yes
  • Bo pokes a finger in the soil
10
Mira writes: if water the flowers, then the soil is dry. What is the mix-up to fix?
The if part and the then part are swappedThe word water needs a capitalThe rule needs a second then
11
Look at the table. On how many days does Bo water the flowers?
235
12
Bo has two rules. This morning the soil is dry and the bell does not ring. What does Bo do?
Waters the flowers onlyLines up onlyDoes both
13
Write an if-then rule of your own. Say what the condition is and what the action is.
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.
Answer key · Set A
Bo the gardener
1His rule never asked him to check the soil Mira said to water, but she never said when. The rule did not ask him to look.
2condition Bo checks the condition, and it is true or false.
3He skips the action and walks on by The soil is not dry, so the condition is false and the then part is skipped.
4False The action runs only when the condition is true.
5The umbrella stays shut and nothing happens, which is fine When the if is false, the then is skipped and nothing happens, which is fine.
6True The soil can be dry on one morning and damp the next.
71-B, 2-C, 3-A A rule needs a condition to check and an action to do.
8the bell rings, it is raining The bell ringing and rain are checked, so they are conditions. Line up and open the umbrella are things to do.
92, 4, 3, 1 He checks first, the condition is true, and then he does the action.
10The if part and the then part are swapped The condition goes after if, and the action goes after then: if the soil is dry, then water the flowers.
112 Bo waters only when the soil is dry, which is Monday and Wednesday. That is 2 days.
12Waters the flowers only The first condition is true, so he waters. The second condition is false, so he skips lining up.
13Your own words: a grown-up reads it.
Mark each answer, count the right ones and write the score on the sheet.