用户:
骄傲的白乌鸦查看:0 回复:0 评论:0 创建时间:2020-03-17T16:49:20
【作品展示】

【作品介绍】
向祖国70周年生日献礼
【作品源代码】
import turtle
t = turtle.Pen()
t.penup()
t.goto((-200), 200)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.pencolor('red')
for i in range(2):
t.forward(438)
t.right(90)
t.forward(292)
t.right(90)
t.end_fill()
t.fillcolor('yellow')
t.pencolor('yellow')
t.penup()
t.goto((-170), 145)
t.pendown()
t.begin_fill()
for x in range(5):
t.forward(50)
t.right(144)
t.end_fill()
def littlestar(x, y, c):
t.penup()
t.goto(x, y)
t.setheading(c)
t.begin_fill()
for i in range(5):
t.forward(20)
t.right(144)
t.end_fill()
littlestar((-100), 180, 305)
littlestar((-85), 150, 30)
littlestar((-85), 120, 3)
littlestar((-100), 100, 300)
t.pencolor('black')
t.goto(80, (-120))
t.write("by python爱好者", font = ("BradleyHand ITC", 20, "bold"))
t.hideturtle()
turtle.done()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn