Question: I do not know what is wrong here I draw the circle exactly. could you please help me? Define a function drawCircle. This function should

I do not know what is wrong here I draw the circle exactly. could you please help me?

Define a function drawCircle. This function should expect a Turtle object, the coordinates of the circles center point, and the circles radius as arguments. The function should draw the specified circle. The algorithm should draw the circles circumference by turning 3 degrees and moving a given distance 120 times. Calculate the distance moved with the formula 2.0 radius 120.0. Define a function main that will draw a circle with the following parameters when the program is run: X = 50 Y = 75 Radius = 100

this is my work::

import turtle

import math

def drawCircle(t,x,y,radius):

t.up() t.setposition(x, y) t.forward(radius) t.left(90) t.down() forDist = ((2 * math.pi * radius) /120) i = 0 while i <=120: t.left(3) t.forward(forDist) i += 1 def main(): t = turtle.Turtle() x = 50 y = 75 radius = 100 drawCircle(t,x,y,radius) main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!