首页 > 其他 > 详细

绘制五星红旗

时间:2017-09-11 19:29:48      阅读:254      评论:0      收藏:0      [点我收藏+]
import turtle
turtle.pensize(2)
turtle.setup(600,400,0,0)
turtle.color("yellow")
turtle.bgcolor(red)
turtle.fillcolor("yellow")
turtle.up()
turtle.goto(-250,100)
turtle.down()
turtle.begin_fill()
for i in range(6):
   
   turtle.forward(100)
   turtle.right(144)
 
turtle.end_fill()
turtle.up()
turtle.goto(-120,160)
turtle.down()
turtle.begin_fill()
turtle.right(90)
for i in range(6):
   
   turtle.forward(20)
   turtle.right(144)
 
turtle.end_fill()

turtle.up()
turtle.goto(-100,140)
turtle.down()
turtle.begin_fill()
turtle.right(90)
for i in range(6):
   
   turtle.forward(20)
   turtle.right(144)
 
turtle.end_fill()

turtle.up()
turtle.goto(-100,100)
turtle.down()
turtle.begin_fill()
turtle.right(180)
for i in range(6):
   
   turtle.forward(20)
   turtle.right(144)

turtle.end_fill()

turtle.up()
turtle.goto(-120,40)
turtle.down()
turtle.begin_fill()
turtle.right(90)
for i in range(6):
   
   turtle.forward(20)
   turtle.right(144)
 
turtle.end_fill()
turtle.hideturtle()

 

绘制五星红旗

原文:http://www.cnblogs.com/wlh353/p/7506164.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!