Watch this turtle. Describe his path.

What commands would you give to make the turtle do this?

This activity will help you to start writing programs to command the robot even if you have never done anything like this before and you know nothing about coding.  The LOGO language is simple to learn. You can start coding and get some pleasing results with a few commands.

The following LOGO commands are sufficient to make the turtle run around a rectangular path. Changing the numbers changes the lengths and angles.

forward 100 (or fd 100)    moves the turtle forward drawing a line 100 units in length.

back 100 (or bk 100)         moves the turtle backward drawing a line 100 units in length.

right 90 (0r rt 90)              turns the turtle through 90 degrees to the right (clockwise).

left 90  (or lt 90)                turns the turtle through 90 degrees to the left (anti-clockwise).

What would you expect the following programs to do?

 

 

 

 

 

Did you guess that both programs do exactly the same thing, that they make the turtle move around a rectangle as above, but only once? Can you see from this how the repeat command works?

You can download free Logo software, either FMSLogo for Microsoft Windows from http://fmslogo.sourceforge.net/or ACSLogo for Mac OS X from http://www.alancsmith.co.uk/logo/

Both come with a Tutorial to help you to get started.

Here are 5 more commands:

clearscreen (cs) , hideturtle (ht) , showturtle (st) , penup (pu) , pendown (pd).

With these commands together with the commands:

forward, back, right, left, repeat

can you write a program to draw this 5-square pattern?

Click here to download the COMMAND THE ROBOT 2 worksheet.

Click here for the Notes for Teachers.

See further Logo activities on the NRICH website.

Leave a Reply

Set your Twitter account name in your settings to use the TwitterBar Section.