绘制十二边形


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()


浙公网安备 33010602011771号