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?

  1. In the command window type to square
  2. Then type in the instructions for making a square.
  3. 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

Revision: r1.2 - 18 Dec 2005 - 17:44 - PeteJohnson