The turtle speaks
Page 10The turtle is good at drawing. But he can also speak. However, you must tell him what to say. This is how you tell the turtle to say "hello":
PRINT [hello]
If you want him to say:
"All mimsy were the borogoves,
And the mome raths outgrabe"
then you can write:
PRINT [All mimsy were the borogoves,]
PRINT [And the mome raths outgrabe]
PRINT [And the mome raths outgrabe]
(I don't know what that means either!) You can also try this:
; make the turtle say hello 10 times
REPEAT 10 [PRINT [Hello!]]
REPEAT 10 [PRINT [Hello!]]
That was not so difficult. Was it?
These are all the words we know now. PRINT is new:
| Logo word | What it means |
|---|---|
| FD 100 | Walk forward 100 steps |
| BK 100 | Walk backward 100 steps |
| LT 90 | Turn left (good for drawing squares) |
| RT 90 | Turn right (good for drawing squares) |
| LT 120 | Turn left (good for drawing triangles) |
| RT 120 | Turn right (good for drawing triangles) |
| CS | Remove everything you have drawn |
| HOME | Move back to the starting point (and draw a line) |
| PU | Lift the pen so you won't draw when you walk |
| PD | Put the pen towards the screen again | REPEAT 10 [ ] | Repeat what's in the box 10 times |
| SETPC 4 | Change the pen to pen number 4 | TO ... END | Remember the word after TO in the future |
| ; | Don't listen to me now | PRINT [I'm a turtle!] | Say "I'm a turtle!" |
These are the words we have taught the turtle. They are the same as on the last page:
| New Logo word | What it means |
|---|---|
| SQUARE | Draw a square |
| CIRCLE | Draw a circle |
| STAR | Draw a star |
Turn page, or back to the table of contents.