문제

with the current code, this is the result.

but I'm trying to get it to look like this, but not sure what to tweak.

#circle circle 

import turtle

turtle.colormode(255)

window=turtle.Screen()

draw=turtle.Turtle()
draw.pensize(2)
window.screensize(1200,1200)
draw.speed('fastest')
red, green, blue= 255, 255, 0


for shape in range(30):
    for circle in range(1):
        draw.circle(200)
    draw.penup()
    draw.forward(30)
    draw.pendown()
    draw.left(20)   
    green=green-5
    blue=blue+6
    draw.color(red, green, blue)

window.mainloop()
도움이 되었습니까?

해결책

If you notice your two images, the one you want has the circles drawn outside the center, while the wrong one draws them around the center. Try changing draw.left(20) to draw.right(20) and adjust your values from there to get the sizes you want.

The change keeps the turtle outside of the circle just drawn, which is what you're looking for.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top