import turtle as t
def draw():
t.forward(150)
def draw_circle():
t.right(120)
t.forward(150)
t.right(120)
t.forward(150)
t.right(120)
t.forward(150)
t.left(60)
def draw_fal():
t.forward(150)
t.left(60)
t.hideturtle()
t.pensize(4)
t.color("#f1ac7a")
t.goto(150,0)
t.seth(120)
for i in range(6):
t.begin_fill()
t.speed(0)
t.fillcolor("green")
draw()
draw_circle()
t.end_fill()
t.seth(120)
t.begin_fill()
for j in range(6):
draw_fal()
t.fillcolor("red")
t.end_fill()
t.exitonclick() #turtle执行完后保留那个页面
标签:150,draw,right,120,forward,六边形,绘制,fill
From: https://www.cnblogs.com/JK8395/p/16794494.html