猫史档案馆


【Python作品分享】五星红旗

用户:哈利·波特OEV3哈利·波特OEV3查看:0 回复:0 评论:0 创建时间:2022-05-08T21:03:52


【作品展示】

center_image

 

【作品介绍】

 

【作品源代码】

from turtle import*
# 蓝旗
pu()
goto(-300, 200)
pd()
color('red')
begin_fill()
for i in range(2):
    fd(600)
    right(90)
    fd(400)
    right(90)
end_fill()
# 大五角星
pu()
goto(-260, 120)
pd()
color('gold')
begin_fill()
for j in range(5):
    fd(120)
    rt(144)
end_fill()
# 第一个小五角星
pu()
goto(-120, 180)
pd()
color('gold')
begin_fill()
for j in range(5):
    fd(40)
    rt(144)
end_fill()
# 第二个小五角星
pu()
goto(-4*20, 6*20)
pd()
color('gold')
begin_fill()
for j in range(5):
    fd(40)
    rt(144)
end_fill()

# 第仨个小五角星
pu()
goto(-4*20, 3*20)
pd()
color('gold')
begin_fill()
for j in range(5):
    fd(40)
    rt(144)
end_fill()
# 第四个小五角星
pu()
goto(-6*20, 1*20)
pd()
color('gold')
begin_fill()
for j in range(5):
    fd(40)
    rt(144)
end_fill()
done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页