Pregunta

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()
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top