Practice with Turtles

As we have seen before turtles can draw letters like a capital C as shown below. It draws each line without picking up the pen in between.

Mixed up programs

        csp-5-2-1-2: csp-5-2-1-1: The following program uses a turtle to draw a capital Z as shown in the picture to the left of this text,  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.  Then it should draw the lines for the Z in the order shown by the numbers on the picture.  

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 Me to see if you are right. You will be told if any of the lines are in the wrong order or are the wrong blocks.

from turtle import * --- from turtle Import * #paired --- space = Screen() --- space = screen() #paired --- alex = Turtle() --- alex = turtle() #paired --- alex.forward(50) alex.right(120) --- alex.forward(50) alex.turn(120) #paired --- alex.forward(100) --- alex.left(120) --- alex.forward(50)
        csp-5-2-1-4: csp-5-2-1-3: The following program uses a turtle to draw a capital N as shown in the picture to the left of this text,  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.  Remember that the turtle starts off facing east when it is created.  Then it should draw the lines for the N in the order shown by the numbers on the picture.  

Drag the needed blocks of statements from the left column to the right column and put them in the right order. There may be some extra blocks that are not needed in a correct solution. Then click on Check Me to see if you are right. You will be told if any of the lines are in the wrong order or are the wrong blocks.

from turtle import * --- space = Screen() --- ella = Turtle() --- ella = Turtle #paired --- ella.left(90) ella.forward(100) --- ella.right(90) ella.forward(100) #paired --- ella.right(150) ella.forward(116) --- ella.left(150) ella.forward(116) #paired --- ella.left(150) --- ella.forward(100) --- ella.Forward(100) #paired

The following example has 4 errors. Can you fix the errors so that the code runs correctly to print a capital L?

The following example has 4 errors. Can you fix the errors so that the code runs correctly to print a capital C?

Note

Case matters in Python so screen is not the same as Screen. Also the open and close parentheses are required after every function and procedure call, even if it doesn’t take any input.

Use the area below to try to draw a letter or number. Use block style rather than curves.

Next Section - More Turtle Procedures and Functions