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?
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.