Question

How to draw circles with random radius,colors and positions? How to declare circle? I've got already functions to make colors and X Y positions random bur I do not know how to draw a circle

Était-ce utile?

La solution

Here is one of many, many ways.

import turtle

geoff = turtle.Turtle()

geoff.pencolor(my_color)
geoff.setpos(my_x, my_y)
geoff.circle(my_radius)

Where my_x, my_y, my_radius and my_color are all predetermined random values, but you said that you could already get those.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top