Representing algorithms

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
Question 32
Medium

A robot program controls a robot on a 5x5 grid. The columns are labelled A to E (left to right) and the rows are labelled 1 to 5 (top to bottom).

The robot starts in cell (A, 5) facing East (to the right, towards column B), as shown by the arrow in the grid below:

ABCDE
1
2
3
4
5→\rightarrow→

The following program is executed:

Forward(3)
TurnLeft()
Forward(2)
TurnRight()
Forward(1)

Trace the path of the robot. Write down the sequence of grid cell coordinates visited by the robot, starting with its initial position (A, 5) and ending with its final position.

[3]

Representing algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Representing algorithms