Skip to main content

Section 16.6 Turtle Coordinates

The space that the turtle draws in is 400 by 400 pixels. The center of the space is at x=0, y=0.
Figure 16.6.1. The coordinates for the drawing space. Note that the center is x = 0 and y = 0.
The program below draws a snowman on a blue background by drawing 4 circles. It positions each of the circles using goto(x,y) to move the turtle to exactly where we want it centered. To draw a circle, we use a trick: we use pensize to make a really big (circular) pen, then do forward(1) to make a dot of the current color.
The program below uses the goto(x,y) to move to the top left corner before drawing a square that nearly fills the drawing space. It uses fillcolor, begin_fill, and end_fill to fill in the shape as it draws it.
Mixed up programs

Checkpoint 16.6.2.

The following program uses a turtle to draw a capital F as shown below, but the lines are mixed up. The program should do all necessary set-up: import the turtle module, get the space to draw on, and create the turtle. It should draw the lines in the order shown by the numbers in the picture on the left.
Drag the needed blocks of statements from the left column to the right column and put them in the right order. There may be extra blocks that are not needed in a correct solution. Then click on Check to see if you are right.
Hint: To go from the top of the F after drawing it to the middle section, you will want to jump to location (0,60).

Checkpoint 16.6.3.

The following program uses a turtle to draw a capital A as shown below, but the lines are mixed up. The program should do all necessary set-up: import the turtle module, get the space to draw on, and create the turtle. It should draw the lines in the order shown by the numbers in the picture on the left. Drag the needed blocks of statements from the left column to the right column and put them in the right order. There may be additional blocks that are not needed in a correct solution. Then click on Check to see if you are right.
Hint: Use the goto to get into position to draw the middle of the A after drawing the two sides.
You have attempted of activities on this page.