Professional Documents
Culture Documents
Logo Commands and Activities
Logo Commands and Activities
seth 0 ………. Sets the heading of the turtle to zero degrees(bearings=North) wherever it
is on the screen
wait 50……… makes the turtle wait 50 units of time before the next command is followed
Repeating
There is a REPEAT command which soon turns out to be very useful!
Where a group of commands is repeated several times an abbreviated version can be developed using
the REPEAT command, for example:
Fd 100 Rt 90
Fd 100 Rt 90
Fd 100 Rt 90
Fd 100 Rt 90
Another example:-
FD10 RT90 FD20 RT90 FD30 RT90
FD10 RT90 FD20 RT90 FD30 RT90
FD10 RT90 FD20 RT90 FD30 RT90
FD10 RT90 FD20 RT90 FD30 RT90
10
20
30
Altering the numbers produces different worms.
Use REPEAT to find out more about the paths that different worms create.
Our worm was made from three numbers, i.e. 10, 20, 30: you might like to try worms using more or
fewer numbers.
Animation
This is essentially drawing, rubbing out, and re-drawing in a slightly different position.
Try this:
REPEAT 30[FD100 BK 100 WAIT 50 PE FD 100 BK 100 WAIT 50 PPT RT 12]
What happened?
What does WAIT do? Try other values?
Can you make the ‘clock’ time 1 minute?
Building procedures
It soon becomes frustrating to keep needing to re-type long lists of commands. But help is hand as
Logo will remember lists of commands If they are entered as a PROCEDURE.
When ready to leave: from FILE choose SAVE AND EXIT. This will save the changes you have made.
SMALL TIP: Try to make procedure names short e.g. for square “sq” would do. This will save you typing
time later!