猫史档案馆


【Python作品分享】【去太空,趣编程】

用户:花金柔花金柔查看:0 回复:0 评论:0 创建时间:2021-04-30T22:05:31


【作品展示】

center_image

 

【作品介绍】

宇航员

 

【作品源代码】

import turtle as t

t.up()
t.speed(0)
t.pensize(5)
t.hideturtle()
t.goto(-50,300)
t.down()
#头
t.right(150)
t.color('black','grey')
t.begin_fill()
t.circle(100)
t.end_fill()
t.color('black','black')
t.begin_fill()
t.circle(100,120)
t.left(60)
t.circle(100, 120)
t.end_fill()
#身体
t.color('black','grey')
t.up()
t.goto(0,115)
t.setheading(180)
t.begin_fill()
t.down()
for a in range(40):
    t.left(1.5)
    t.forward(2)
t.setheading(-110)
for a in range(40):
    t.left(1)
    t.forward(5)
for a in range(80):
    t.left(1.5)
    t.forward(2)
t.setheading(65)
for a in range(45):
    t.left(1)
    t.forward(5)
t.setheading(120)
for a in range(40):
    t.left(1.5)
    t.forward(2)
t.end_fill()
#手
t.up()
t.goto(40,60)
t.setheading(90)
t.begin_fill()
t.down()
for a in range(2):
    t.circle(30,180)
    t.forward(100)
t.end_fill()
#脚
t.up()
t.goto(-20,-165)
t.right(180)
t.begin_fill()
t.down()
for a in range(2):
    t.forward(150)
    t.circle(30,180)
t.end_fill()
#结束
t.up()
t.goto(100,300)
t.write('宇航员', font = ('Arial', 20, 'normal'))
t.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页