Python绘制六角形

import turtle
turtle.penup()
turtle.fd(-100)
turtle.pendown()
turtle.pensize(10)
turtle.pencolor("green")
turtle.left(30)
turtle.forward(100)
turtle.right(60)
turtle.forward(100)
turtle.right(60)
turtle.forward(100)
turtle.right(60)
turtle.forward(100)
turtle.right(60)
turtle.forward(100)
turtle.right(60)
turtle.forward(100)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)
turtle.left(60)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)
turtle.left(60)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)
turtle.left(60)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)
turtle.left(60)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)
turtle.left(60)
turtle.forward(100)
turtle.right(120)
turtle.forward(100)

 

posted @ 2020-03-11 14:43  哦噢  阅读(3547)  评论(0编辑  收藏  举报