Question: Currently working on Python 3.6: (Turtle: filled rectangle and circle) write a program that displays a rectangle centered at (-75, 0) with width and height

Currently working on Python 3.6:

(Turtle: filled rectangle and circle) write a program that displays a rectangle centered at (-75, 0) with width and height 100 and a circle centered at (50, 0) with radius 50. Fill 10 random points inside the rectangle and 10 inside the circle, as shown:

# Fill a rectangle def drawRectangle(x = -75, y = 0, width = 100, height = 100, points=10):

# Fill a circle def drawCircle(x = 50, y = 0, radius = 50, points=10):

I understand the portion of drawing the rectangle and circle, but I tried using the random integer for the dots, by doing something like:

rand_x=-125,-25)

rand_y=random.randint(-50,50)

turtle.goto(rand_x,rand_y)

turtle.dot(dotdiameter) which i specified earlier as 6

but when I try running this program I get an error of it saying "attribute error: 'int' object has no attribute 'randint' "

not sure what im doing wrong but if I could get some help that would be great!

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!