You may also like

problem icon

First Forward Into Logo 10: Count up - Count Down

What happens when a procedure calls itself?

problem icon

First Forward Into Logo 2: Polygons

This is the second in a twelve part introduction to Logo for beginners. In this part you learn to draw polygons.

problem icon

First Forward Into Logo 4: Circles

Learn how to draw circles using Logo. Wait a minute! Are they really circles? If not what are they?

First Forward Into Logo 1: Square Five

Stage: 2, 3 and 4 Challenge Level: Challenge Level:1

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