猫史档案馆


【Python作品分享】国旗【作品秀】

用户:ZCH_ProZCH_Pro查看:0 回复:0 评论:0 创建时间:2020-04-16T21:25:33


【作品展示】

center_image

 

【作品介绍】

`````````````

国旗辣

海龟库搞得~

 

【作品源代码】


import turtle as t
t.setup(675,450,700,90)     
t.bgcolor("red")
t.color("yellow","yellow")  
t.speed(8)
dian_mia = [(-280,100),(-100,160),(-50,110),(-40,50),(-100,10)]     
dian_sth = [0,55,30,5,-30]    
for i in range(5):         
    t.up()
    t.goto(dian_mia[i])
    t.setheading(dian_sth[i])
    t.begin_fill()
    for m in range(5):     
        t.fd(150 if i==0 else 50)  
        t.right(144)
        t.down()     
    t.end_fill()
t.hideturtle()
t.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页