使用turtle库绘制一个六角形
from turtle import *
color("black","red")
begin_fill()
pu()
fd(-200)
pd()
seth(30)
fd(300)
seth(-90)
fd(300)
seth(150)
fd(300)
end_fill()
pu()
seth(90)
fd(150)
seth(0)
fd(87)
begin_fill()
pd()
seth(-90)
fd(300)
seth(30)
fd(300)
seth(150)
fd(300)
end_fill()
done()


浙公网安备 33010602011771号