用户:BWS猴急的电池查看:0 回复:0 评论:0 创建时间:2019-12-30T19:55:47
【作品展示】

【作品介绍】
五星红旗迎风飘扬
【作品源代码】
import turtle
myPen = turtle.Pen()
myPen.penup()
myPen.goto((-200), 200)
myPen.pendown()
myPen.begin_fill()
myPen.fillcolor("red")
myPen.pencolor("red")
for i in range(2):
myPen.forward(438)
myPen.right(90)
myPen.forward(292)
myPen.right(90)
myPen.end_fill()
myPen.pencolor("yellow")
myPen.fillcolor("yellow")
myPen.penup()
myPen.goto((-170), 145)
myPen.pendown()
myPen.begin_fill()
for i in range(5):
myPen.forward(50)
myPen.right(144)
myPen.end_fill()
myPen.penup()
myPen.goto((-100), 180)
myPen.setheading(305)
myPen.pendown()
myPen.begin_fill()
for i in range(5):
myPen.forward(20)
myPen.right(144)
myPen.end_fill()
myPen.penup()
myPen.goto((-85), 150)
myPen.setheading(305)
myPen.pendown()
myPen.begin_fill()
for i in range(5):
myPen.forward(20)
myPen.right(144)
myPen.end_fill()
myPen.penup()
myPen.goto((-85), 120)
myPen.setheading(305)
myPen.pendown()
myPen.begin_fill()
for i in range(5):
myPen.forward(20)
myPen.right(144)
myPen.end_fill()
myPen.penup()
myPen.goto((-100), 100)
myPen.setheading(305)
myPen.pendown()
myPen.begin_fill()
for i in range(5):
myPen.forward(20)
myPen.right(144)
myPen.end_fill()
myPen.hideturtle()
turtle.done()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn