2.六角形的绘制

import turtle
turtle.screensize(800,800,"brown")
turtle.setup(800,500,100)
turtle.penup()
turtle.fd(-100)
turtle.pendown()
turtle.pensize(7)
turtle.pencolor("pink")
turtle.seth(-40)
turtle.fd(90)
turtle.right(120)
turtle.fd(90)
turtle.right(120)
turtle.fd(60)
turtle.right(60)
turtle.fd(60)
turtle.right(120)
turtle.fd(90)
turtle.right(120)
turtle.fd(90)
turtle.right(120)
turtle.fd(30)
turtle.left(60)
turtle.fd(30)
turtle.done()

原文地址:https://www.cnblogs.com/study007/p/12497757.html