Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The function has one parameter, a Turtle. After the function definition, call the function 7 times, preferably in a loop. import turtle import random

 

The function has one parameter, a Turtle. After the function definition, call the function 7 times, preferably in a loop. import turtle import random wn = turtle.Screen() t = turtle.Turtle() x = random.randrange(-120, 140) y = random.randrange(-120, 140) side1 = random.randint(50, 100) side2 = random.randint(50, 100) t.penup() t.goto(x, y) t.pendown() t.goto(x + side1, y) t.goto(x + side1, y + side2) t.goto(x, y) t.goto(x + side1, y+ side2) t.hideturtle() wn.exitonclick()

Step by Step Solution

3.38 Rating (167 Votes )

There are 3 Steps involved in it

Step: 1

import turtle import random Define a function that draws a ran... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Algebra

Authors: Margaret Lial, John Hornsby, Terry McGinnis

13th Edition

0134895983, 978-0134895987

More Books

Students also viewed these Programming questions

Question

Solve each system. -5x + 2y + z = 5 -3x - 2y 2 = 3 -x+6y= 1

Answered: 1 week ago