绘制十二边形

image

image





import turtle as t
def draw():
    t.left(30)
    t.forward(50)




def draw_circle():
    t.right(120)
    t.forward(50)
    t.right(120)
    t.forward(50)
    t.right(120)
    t.forward(50)

t.goto(100,25)
t.seth(90)
t.begin_fill()
for i in range(12):
    draw()
    draw_circle()

t.fillcolor("yellow")
t.end_fill()
t.begin_fill()
for j in range(12):
  draw()
t.fillcolor("red")
t.end_fill()


image

posted @ 2022-10-15 23:53  Selina风乎舞雩  阅读(204)  评论(0)    收藏  举报