1
Count the turns
Computing 1: Topic 1.4, pp. 49–59
GoalFind and fix a bug in a program that should make the robot turn all the way round.
New words
full turn · turning all the way round to face the same way againspin · turn round and round
Explanation
A full turn is four quarter turns. After a full turn the robot faces the way it started. If a program has three turns, the robot does not finish facing the same way. That is a bug. Count the turn cards to check.
Worked examples
Kenji wants the robot to face left. It starts facing up. He writes R R. The robot faces down. The bug: one R is missing. R R R works, and so does one L.
A full turn needs R R R R. That is four quarter turns. The robot faces up again, as it began.
Lola wants a half turn so that the robot faces the opposite way. She writes R R R R and the robot faces the same way. The bug: she needs only two turns, R R.
Class activity
Spin and count: stand up on a spot. Ask a partner to say a number of quarter turns. You turn that many times. Say which way you face. Find how many turns bring you all the way round. Find how many turns face you the opposite way.
Practice
1
The robot faces up. The code is R R R. Which way does it face at the end?
Left. It has not made a full turn.
2
How do you fix R R R to make a full turn?
Add one more R, so the code is R R R R.
3
You want the robot to face the opposite way. How many quarter turns?
2.
4
The code is L L L L. Does the robot make a full turn?
Yes. Four quarter turns left also go all the way round.