Python-Art, Candied Haws

import turtle
t = turtle.Pen()
# draw speed
t.speed(3)
# start to fill with red
t.begin_fill()
t.color("red")
# draw a circle with radius 50
t.circle(60)
t.end_fill()
# draw blue circle
t.penup()
t.goto(65,65)
t.pendown()
# start to fill with blue
t.begin_fill()
t.color("blue")
# draw a red circle
t.pencolor("red")
t.circle(60)
t.end_fill()
# draw a red circle filled with yellow
t.penup()
t.goto(130,130)
t.pendown()
t.begin_fill()
t.color("yellow")
t.pencolor("red")
t.circle(60)
t.end_fill()
# draw a red circle filled with purole
t.penup()
t.goto(195,195)
t.pendown()
t.begin_fill()
t.color("purple")
t.pencolor("red")
t.circle(60)
t.end_fill()
# draw stick
t.penup()
# stick width
t.pensize(10)
# set stick color
t.pencolor("green")
# set start point of the stick
t.goto(240,280)
t.pendown()
# set end point of the stick
t.goto(-140,-90)
turtle.done()

dahan1999

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts