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 16:20
Quincy would like to view the contents of a specific message in his inbox. a portion of his computer screen is shown. what should quincy do in order to complete this task? 1. click on the inbox in the navigation pane, and click on the specific message in the folder pane to display its contents. 2. click on the inbox in the outlook today window, and click on the specific message in the folder pane to display its contents. 3. double-click the message’s header in the outlook today window, and right-click on the specific message to display its contents. 4. double-click the mail option in the navigation pane, and right-click on the specific message to display its contents.
Answers: 1
question
Computers and Technology, 22.06.2019 01:00
How can a broadcast station be received through cable and satellite systems?
Answers: 1
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
You know the right answer?
Define a function drawCircle.

This function should expect a Turtle object, the coordina...
Questions
question
Arts, 20.06.2021 14:00
question
Mathematics, 20.06.2021 14:00
question
Computers and Technology, 20.06.2021 14:00
question
Law, 20.06.2021 14:00
question
Business, 20.06.2021 14:00
Questions on the website: 13722360