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 00:30
These tools give presenters more freedom to move about the room and interact with their audience. laptop computer laser pointer lcd projector remote control
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
You know the right answer?
Define a function drawCircle.
This function should expect a Turtle object, the coordinates of...
Questions
question
Mathematics, 05.11.2020 01:00
question
Mathematics, 05.11.2020 01:00
Questions on the website: 13722367