Learning New Commands
In the Last Lesson
We learned how to make the turtle do things over and over.
In this lesson
How do you teach the turtle to do new things? Remember the instructions for a square?
repeat 4 [ fd 40 left 90 ]
Today we will learn how to teach the turtle that when we say "square" it should follow those instructions.
What to do?
- In the command window type
to square
- Then type in the instructions for making a square.
- When you are finished click on finished
Now the turtle knows how to draw.
What will happen if you now type this...
repeat 18 [ left 20 square ]
Can you teach the turtle to draw a five sides star?
Questions
Just raise your hand and I will help.
Did you know?
Once you teach the turtle one word, you can use it when you teach even more words. Can you make a word which draws a flower?
--
PeteJohnson? - 27 Oct 2005