猫史档案馆


【Python作品分享】庆祝祖国70华诞【作品秀】

用户:2020我们都是追梦人2020我们都是追梦人查看:0 回复:0 评论:0 创建时间:2019-12-14T21:07:17


【作品展示】

center_image

 

【作品介绍】

今年是中华喵建国第70周年,70年沧海桑田,在中国喵党的正确领导下,祖国的国际地位不断提高,成为世界第二经济发展体。今天我以小小的科技成果,祝福祖国70华诞!

 

【作品源代码】

import turtle


t = turtle.Turtle()
t.speed(0)
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 喵allstar(x, y, z):

    t.penup()
    t.goto(x, y)
    t.setheading(z)
    t.pendown()
    t.begin_fill()
    t.fillcolor('yellow')
    t.pencolor('yellow')
    for i in range(5):
        t.forward(20)
        t.right(144)
    t.end_fill()

喵allstar((-100), 180, 305)
喵allstar((-85), 150, 30)
喵allstar((-85), 120, 3)
喵allstar((-100), 100, 300)

t.pencolor('black')
t.penup()
t.goto((-200), 200)
t.pendown()
t.write('I LOVE CHINA', font = ('楷体', 30, 'bold'))

t.penup()
t.goto(100, (-120))
t.pendown()
t.write('Class 8 Grade8  谢凯恺', font = ('楷体', 10, 'normal'))

t.penup()
t.goto(100, (-140))
t.write('赣州市文清实验国际学校', font = ('楷体', 10, 'normal'))

t.pendown()
turtle.done()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页