2014 – Q20 (c)

A programming language provides the following pre-defined functions.

move(n) = distance moved in pixels

rotate(d) = degrees turned (positive means clockwise)

These can be used by the programmer to draw lines.

A programmer writes the code to draw a square. The code is shown below.

2014 q20 a

Suggest a new pre-defined function that could be added to this programming language. (1)

Any suitable function. (1 mark)

For example:

  • Polygon (any shape)
  • Text tool
  • Fill

Not “hexagon” or “square” as they are given in the question.

Leave a Reply

Your email address will not be published. Required fields are marked *