Question: The following programs use the turtle module; 1. Write a program to draw five squares in random locations in the window; make each square a

The following programs use the turtle module;

1. Write a program to draw five squares in random locations in the window; make each square a different color. Use a loop to draw each square

2. complete the following code to use a turtle to draw a series of concentric circles. write the body of the loop that draws the circles.

import turtle

wn = turtle.Screen()

jane = turtle.Turtle() for r in range(10, 50, 10): #Add your code here to draw a bullseye pass #This statement does nothing

wn.exitonclick()

3. complete the following code to use a turtle to draw a rectangle with vertical lines at every 10 pixels. The given code draws the initial rectangle. add code that draws vertical lines at a distance of 10 apart; use a loop.

import turtle

wn = turtle.Screen() jane = turtle.Turtle() jane.up() jane.goto(-200, -50) jane.down() for distance in [400, 100, 400, 100]: jane.forward(distance) jane.left(90)

#Add your code here

wn.exitonclick()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!