码迷,mamicode.com
首页 > 编程语言 > 详细

Python绘制六角形

时间:2020-03-11 15:44:15      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:turtle   图片   imp   port   pytho   pen   style   info   import   

技术图片

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)

 

Python绘制六角形

标签:turtle   图片   imp   port   pytho   pen   style   info   import   

原文地址:https://www.cnblogs.com/MARCOREUS11/p/12462326.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!