Reputation: 59
It succeeded in drawing a circle of 100, 80, and 60 people in radius. However, I am trying to change the line of a circle to a dotted line, but I don't know where to put the function. Ask for advice.
Upvotes: 0
Views: 75
Reputation: 2261
import turtle
aaa = turtle.Turtle()
aaa.speed(10)
def DotCircle(*x_val):
x=x_val[0]
y=x_val[1]
r=x_val[2]
for kk in range(1):
aaa.penup()
aaa.goto(x,y)
number_of_dots = 50
for i in range(number_of_dots):
aaa.circle(r, 360/number_of_dots)
aaa.dot()
DotCircle(0,0,100)
DotCircle(0,20,80)
DotCircle(0,40,60)
Docs link: https://docs.python.org/3/library/turtle.html#turtle.circle
note that now the dots are not created while the turtle walks in aaa.circle(r, 360/number_of_dots)
nut explicitly by calling aaa.dot()
Upvotes: 1