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, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 05:30
How do i get rid of my member ship for
Answers: 2
You know the right answer?
Define a function drawCircle.
This function should expect a Turtle object, the coordinates of...
Questions
question
Mathematics, 07.06.2021 17:20
question
Arts, 07.06.2021 17:20
question
Mathematics, 07.06.2021 17:20
question
World Languages, 07.06.2021 17:20