Example robot: domestic robots

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Example robot: domestic robots

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which of these is a domestic robot?
A A robot arm that welds car parts in a factory
B A robot vacuum cleaner that cleans the living room floor
2. Which job could a robot lawnmower do?
A Cut the grass in a garden by itself
B Pick fruit from trees on a large farm
3. Which sensor job helps a robot vacuum cleaner avoid damage?
A A sensor detects a wall so the robot turns away
B A wheel detects a wall so the robot turns away
4. Why does a robot vacuum cleaner have a drop sensor?
A To detect stairs so it does not fall down them
B To store dust until the bin is emptied
5. In a robot vacuum cleaner, what are the wheels part of?
A The sensors that detect walls and drops
B The mechanical structure that lets it move around

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1robot vacuum cleaner AA domestic robot needs sensors to sense its surroundings, such as walls and furniture, so it can avoid bumping into things
2cliff sensor BA sensor that detects a drop, such as stairs, so the robot does not fall down
3A domestic robot is used in the home to do a household job such as mowing the lawn Crobot lawnmower
4Wheels are the mechanical structure that lets a domestic robot move across the floor Dwheels driven by motors
5A robot vacuum cleaner has no sensors and just follows a fixed path EA domestic robot that moves around a room on wheels and cleans the floor automatically
6A robot lawnmower is not a robot because it is used in a garden at home FBeing used in the home or garden does not stop it being a robot; it is a domestic robot because it senses and moves automatically

Definitions

domestic robot

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____ battery > 20 IF wallSensor = TRUE THEN turn(90) ENDWHILE
2.
IF dropSensor = TRUE THEN stopWheels() _____
3.
wheelSpeed ← 5 IF dropSensor = TRUE THEN wheelSpeed ← _ ENDIF
4.
REPEAT mowGrass() _____ batteryLow = TRUE
5.
distance ← frontSensor() IF distance _ 5 THEN turn(90) ENDIF

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A WHILE battery > 10
B IF wall_sensor = TRUE
C turn_right()
D ENDIF
E ENDWHILE
Question 2
A mower_on ← TRUE
B WHILE mower_on = FALSE
C cut_grass()
D ENDWHILE
Question 3
A IF path_clear = TRUE THEN
B left_wheel ← ON
C right_wheel ← OFF
D ENDIF
Question 4
A battery ← 100
B WHILE battery > 20
C clean_floor()
D battery ← battery + 1
E ENDWHILE
Question 5
A WHILE floor_dirty TRUE
B vacuum_on()
C move_forward()
D ENDWHILE

Answer Key

Example robot: domestic robots
Section A: Quick Questions
Q1
B — A robot vacuum cleaner that cleans the living room floor
Q2
A — Cut the grass in a garden by itself
Q3
A — A sensor detects a wall so the robot turns away
Q4
A — To detect stairs so it does not fall down them
Q5
B — The mechanical structure that lets it move around
Section B: Match the Pairs
Q1
robot vacuum cleaner → A domestic robot that moves around a room on wheels and cleans the floor automatically
Q2
cliff sensor → A sensor that detects a drop, such as stairs, so the robot does not fall down
Q3
A domestic robot is used in the home to do a household job such as mowing the lawn → robot lawnmower
Q4
Wheels are the mechanical structure that lets a domestic robot move across the floor → wheels driven by motors
Q5
A robot vacuum cleaner has no sensors and just follows a fixed path → A domestic robot needs sensors to sense its surroundings, such as walls and furniture, so it can avoid bumping into things
Q6
A robot lawnmower is not a robot because it is used in a garden at home → Being used in the home or garden does not stop it being a robot; it is a domestic robot because it senses and moves automatically
Section C: Definitions
Q1
domestic robot — A robot used in the home, such as a robot vacuum cleaner or lawnmower, that senses its surroundings and moves automatically to do a household job.
Section D: Fill in the Blanks
Q1
WHILE battery > 20 IF wallSensor = TRUE THEN turn(90) ENDWHILE
Q2
IF dropSensor = TRUE THEN stopWheels() ENDIF
Q3
wheelSpeed ← 5 IF dropSensor = TRUE THEN wheelSpeed ← 0 ENDIF
Q4
REPEAT mowGrass() UNTIL batteryLow = TRUE
Q5
distance ← frontSensor() IF distance < 5 THEN turn(90) ENDIF
Section E: Spot the Error
Q1
B — The IF statement is missing THEN. It should be IF wall_sensor = TRUE THEN so the robot vacuum turns when its sensor detects a wall.
Q2
B — The loop condition is wrong. With FALSE the loop never runs, so the robot lawnmower would not cut any grass. It should be WHILE mower_on = TRUE.
Q3
C — To drive straight forward, both wheels must turn. With the right wheel OFF the robot would spin around. It should be right_wheel ← ON.
Q4
D — The battery level should go down as the robot cleans. Adding 1 means the battery never drops below 20 and the loop never ends. It should be battery ← battery - 1.
Q5
A — The condition is missing the comparison operator. It should be WHILE floor_dirty = TRUE.