Computers and Technology

Define a function drawcircle. this function should expect a turtle object, the coordinates of the circle's centerpoint, and the circle's radius as arguments. the function should draw the specified circle. the pen color should bechanged 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 theformula 2.0*n*radius/120.0. fill in the circle with blue color. after drawing the circle, hide the turtle. my instructor told me that i have to use the formula not the circle function to make this work. you! import turtleimport mathdef drawcircle(centerpoint, radius): degree = 3count = 0centerpoint = (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 += 3t. setheading(degree)count += 1drawcircle(centerpoint, radius)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:30, carealee
What important technology has done the most to allow a businesses a chance to compete with larger international companies
Answers: 1
image
Computers and Technology, 21.06.2019 21:00, ziahziah
Which function key is used to enable the spelling & grammar function in a word processing program such as microsoft word?
Answers: 3
image
Computers and Technology, 22.06.2019 14:00, michelle7511
Which database model is best used for data warehouse and data mining
Answers: 3
image
Computers and Technology, 23.06.2019 03:00, jarteria0
State 7 common key's for every keyboard
Answers: 1
Do you know the correct answer?
Define a function drawcircle. this function should expect a turtle object, the coordinates of the ci...

Questions in other subjects:

Konu
Mathematics, 18.05.2021 22:10