Copyright © University of Cambridge. All rights reserved.

'First Forward Into Logo 1: Square Five' printed from http://nrich.maths.org/

Show menu


Most of the Logo challenges do not have solutions because you will know that your program is correct if it draws the required shapes. In addition you could write different programs and still get the desired result.

In this case we give below a very simple program. It has has many repetitions and it could be made shorter and more elegant by using a REPEAT command which will be introduced in the next section. Here we give just a list of commands but we shall learn to give each short program its own name and to use that name as a command to start the program.

Note that the program is written here in small case letters rather than capitals and most LOGO software allows either. It is good practice to be consistent and stick to one or the other and we generally use capitals because they are easier to read.

rt 45 fd 20
lt 90 fd 40
rt 90 fd 40
lt 90 fd 40
rt 90 fd 20
rt 90 fd 20
rt 90 fd 40
lt 90 fd 40
rt 90 fd 40
lt 90 fd 20
lt 90 fd 80
lt 90 fd 80
lt 90 fd 80
lt 90 fd 80
lt 135