4. Using the Turtle’s Pen
- Using the Turtle’s Pen
The turtle holds a virtual pen that it uses to draw lines. By default, the pen is down, which means it draws wherever it goes. However, you can command the turtle to lift its pen to move to a new location without leaving a mark.
- pendown (or pd): This is the default mode. When the pen is down, the turtle leaves a line wherever it moves.
- penup (or pu): This command lifts the pen. You can move the turtle to a new spot on the screen without drawing anything. This is useful for creating disconnected shapes or starting a new drawing in a different area.
For example, to move forward 50 steps without drawing a line, you would type:
pu
fd 50
Now that you know how to move and how to use the pen, let’s put it all together to create your first shape!