subject

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)

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, davisparker5269
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname, firstname with no spaces in it) or a name (lastname, firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none. txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
image
Computers and Technology, 21.06.2019 22:00, richellemjordan
Draw the hierarchy chart and design the logic for a program that calculates service charges for hazel's housecleaning service. the program contains housekeeping, detail loop, and end-of-job modules. the main program declares any needed global variables and constants and calls the other modules. the housekeeping module displays a prompt for and accepts a customer's last name. while the user does not enter for the name, the detail loop accepts the number of bathrooms and the number of other rooms to be cleaned. the service charge is computed as $40 plus $15 for each bathroom and $10 for each of the other rooms. the detail loop also displays the service charge and then prompts the user for the next customer's name. the end-of-job module, which executes after the user enters the sentinel value for the name, displays a message that indicates the program is complete.
Answers: 2
image
Computers and Technology, 22.06.2019 11:00, kingethan08
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, mrnotsosmart744
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
You know the right answer?
Define a function drawcircle. this function should expect a turtle object, the coordinates of the ci...

Questions in other subjects:

Konu
Chemistry, 21.11.2020 06:20
Konu
Physics, 21.11.2020 06:20
Konu
Advanced Placement (AP), 21.11.2020 06:20