subject

Define a function drawCircle.

This function should expect a Turtle object, the coordinates of the circle's center point, and the circle's radius as arguments. The function should draw the specified circle. The pen color should be changed to yellow before drawing a circle and the width of the pen to 5 pixels. The algorithm should draw the circle's circumference by turning 3 degrees and moving a given distance 120 times. Calculate the distance moved with the formula 2.0*n*radius/120.0.

Fill in the circle with blue color. After drawing the circle, hide the turtle.

import turtle

import math

def drawCircle(centerpoint, radius):

degree = 3

count = 0

centerpoint = (2.0 * math. pi * radius / 120)

t. home()

t. setheading(degree)

while count <= 120:

t. down()

t. forward(2.0 * math. pi * radius / 120)

t. up()

degree += 3

t. setheading(degree)

count += 1

drawCircle(centerpoint, radius)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:20
What do you need to know & understand about global expansion.
Answers: 2
question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 09:50
What is a rush associated with alcohol?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
You know the right answer?
Define a function drawCircle.

This function should expect a Turtle object, the coordina...
Questions
question
Mathematics, 12.04.2020 06:48
question
Mathematics, 12.04.2020 06:48
question
Physics, 12.04.2020 06:48
question
Health, 12.04.2020 06:49
Questions on the website: 13722367