Definition Set the position of cursor in x,y. Syntax turtle.setpos(x,y) setpos(x,y) Parameters x=X-Axis y=Y-Axis Examples The turtle dot loop is generated through while statement and colors are selected through the random.sample method.
The turtle graphics is created through the math functions.
For loop is generated within for loop for creating circles and fill them with random colors.
The created the square by line and line color are picked by random.sample.
The turtle.write syntax is used to write the text while using the random.sample to pick color.
|