More Turtle Stamp PracticeΒΆ

This section provides more practice using the stamp procedure.

Mixed up program

        csp-10-5-1: The following program uses the stamp method to create an X of turtle shapes as shown to the left,  but the lines are mixed up.  The program should do all necessary set-up, create the turtle, set the shape to "turtle", and pick up the pen. Stamp the blue turtles before you stamp the green ones.   

Drag the needed blocks of statements from the left column to the right column and put them in the right order with the correct indention. 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() --- space = screen() #distractor --- nick = Turtle() nick.shape("turtle") --- nick.penup() --- nick.penUp() #distractor --- nick.goto(-150,-150) nick.left(45) --- nick.goto(-150,-150) nick.left(90) #distractor --- nick.color("blue") for num in range(15): nick.stamp() nick.forward(30) --- nick.goto(150,-150) nick.left(90) --- nick.goto(150,-150) nick.left(45) #distractor --- nick.color("green") for num in range(14): --- nick.stamp() nick.forward(30)
        csp-10-5-2: The following program uses the stamp method to create two squares of turtle shapes as shown to the left,  but the lines are mixed up.  The program should do all necessary set-up, create the turtle, set the shape to "turtle", and pick up the pen.  Draw the blue square before you draw the green one.

Drag the needed blocks of statements from the left column to the right column and put them in the right order with the correct indention. 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() --- nick = Turtle() nick.shape("turtle") --- nick = Turtle() nick.shape("Turtle") #distractor --- nick.penup() --- nick.goto(-150,-150) nick.left(90) --- nick.goto(-150,-150) nick.right(90) #distractor --- nick.color("blue") for count in range(4): for num in range(5): nick.stamp() nick.forward(30) nick.right(90) --- nick.goto(-120,-120) nick.color("green") for count in range(4): --- for num in range(3): --- for num in range(2): #distractor --- nick.stamp() nick.forward(30) --- nick.right(90) --- nick.left(90) #distractor

Use the area below to try to draw a pattern using a for loop and the stamp procedure.

Note

Discuss topics in this section with classmates.

Show Comments
Next Section - Chapter 10 - Summary