用户:
苏迎嘉伦工作室查看:1 回复:5 评论:1 创建时间:2021-05-05T20:57:32
【作品展示】

【作品介绍】
这是我精心制作的活动作品(求一等奖乐高)!!!第一次参加活动,孩子哭着说要得了高(孩子是乐高迷)我说那你好好做一个作品就能得到了,然后他就奋发努力的编程,我看还不错。
【作品源代码】
import turtle
import time
#开始进入Python的世界
w = turtle.Pen()
w.speed(0)
turtle.bgcolor("#000000")
w.penup()
w.pencolor("#cccccc")
w.goto(0, (-700))
w.pendown()
w.pensize(250)
w.circle(200)
w.penup()
w.pencolor("#3333ff")
w.pensize(19)
w.goto((-50), (-200))
w.pendown()
w.circle(20, steps=3)
w.penup()
w.goto(50, (-200))
w.pendown()
w.circle(20, steps=3)
w.penup()
w.goto(50, (-200))
w.penup()
w.pencolor("#ffffff")
w.sety((-160))
w.setx(90)
w.pensize(1)
w.left(45)
w.pendown()
w.begin_fill()
w.fillcolor("#ffffff")
w.circle(120, steps=4)
w.end_fill()
w.penup()
w.sety((-40))
w.setx(90)
w.pensize(1)
w.pendown()
w.begin_fill()
w.fillcolor("#ffffff")
w.circle(118, steps=4)
w.end_fill()
w.penup()
w.left(135)
w.sety(278)
w.setx(8)
w.pensize(1)
w.pendown()
w.begin_fill()
w.fillcolor("#ffffff")
w.circle(100, steps=3)
w.end_fill()
w.penup()
w.goto((-70), (-30))
w.pencolor("#ff0000")
w.pensize(30)
w.write('中国航天', font = ('Arial', 30, 'bold'))
w.penup()
w.goto((-80), (-30))
w.pencolor("#ff0000")
w.penup()
w.sety(0)
w.setx((-124))
w.pensize(1)
w.left(90)
w.pendown()
w.begin_fill()
w.fillcolor("#ff6600")
w.circle(30, steps=3)
w.end_fill()
w.penup()
w.sety(0)
w.setx(137)
w.pensize(1)
w.right(180)
w.pendown()
w.begin_fill()
w.fillcolor("#ff6600")
w.circle(30, steps=3)
w.end_fill()
w.penup()
w.goto(300, 200)
w.pendown()
w.begin_fill()
w.fillcolor("#cc66cc")
w.circle(50)
w.end_fill()
w.penup()
w.goto(350, (-200))
w.pendown()
w.begin_fill()
w.fillcolor("#33ff33")
w.circle(50)
w.end_fill()
w.penup()
w.goto((-350), (-150))
w.pendown()
w.begin_fill()
w.fillcolor("#ffcccc")
w.circle(50)
w.end_fill()
w.penup()
w.goto((-350), 200)
w.pendown()
w.begin_fill()
w.fillcolor("#ff6600")
w.circle(180)
w.end_fill()
w.penup()
w.goto(550, 135)
w.pendown()
w.begin_fill()
w.fillcolor("#66ffff")
w.circle(135)
w.end_fill()
w.penup()
w.goto(10, 30)
w.pencolor("#ff0000")
w.right(45)
w.begin_fill()
w.fillcolor("#ff0000")
w.circle(50, steps=4)
w.end_fill()
w.penup()
w.goto(80, 30)
w.pencolor("#ff0000")
w.begin_fill()
w.fillcolor("#ff0000")
w.circle(50, steps=4)
w.end_fill()
w.penup()
w.goto((-30), 54)
w.pencolor("#ffff66")
w.begin_fill()
w.fillcolor("#ffff00")
for __count in range(5):
w.pendown()
w.forward(30)
w.right(145)
w.end_fill()
w.penup()
w.goto((-8), 35)
w.pencolor("#ffff66")
w.begin_fill()
w.fillcolor("#ffff00")
for __count in range(5):
w.pendown()
w.forward(15)
w.right(145)
w.end_fill()
w.penup()
w.goto(3, 55)
w.pencolor("#ffff66")
w.begin_fill()
w.fillcolor("#ffff00")
for __count in range(5):
w.pendown()
w.forward(15)
w.right(145)
w.end_fill()
w.penup()
w.goto(4, 73)
w.pencolor("#ffff66")
w.begin_fill()
w.fillcolor("#ffff00")
for __count in range(5):
w.pendown()
w.forward(15)
w.right(145)
w.end_fill()
w.penup()
w.goto((-15), 86)
w.pencolor("#ffff66")
w.begin_fill()
w.fillcolor("#ffff00")
for __count in range(5):
w.pendown()
w.forward(15)
w.right(145)
w.end_fill()
w.hideturtle()
time.sleep(5)
def b():
C = input('请选择等级')
if (C == '普通'):
print('您选择了普通,消耗100万RMB')
print('消费成功!即将起飞!!!')
w.penup()
w.goto((-50), (-200))
w.dot(50)
w.goto(50, (-200))
w.dot(50)
w.goto((-50), (-250))
w.dot(35)
w.goto(50, (-250))
w.dot(35)
w.goto((-50), (-300))
w.dot(20)
w.goto(50, (-300))
w.dot(20)
elif (C == '中等'):
print('您选择了中等,消耗1000万RMB')
print('消费成功!即将起飞!!!')
w.penup()
w.goto((-50), (-200))
w.dot(50)
w.goto(50, (-200))
w.dot(50)
w.goto((-50), (-250))
w.dot(35)
w.goto(50, (-250))
w.dot(35)
w.goto((-50), (-300))
w.dot(20)
w.goto(50, (-300))
w.dot(20)
elif (C == '绅士'):
print('您选择了绅士,消耗1亿RMB')
print('消费成功!即将起飞!!!')
w.penup()
w.goto((-50), (-200))
w.dot(50)
w.goto(50, (-200))
w.dot(50)
w.goto((-50), (-250))
w.dot(35)
w.goto(50, (-250))
w.dot(35)
w.goto((-50), (-300))
w.dot(20)
w.goto(50, (-300))
w.dot(20)
elif (C == '高级'):
print('您选择了高级,消耗5亿RMB')
print('消费成功!即将起飞!!!')
w.penup()
w.goto((-50), (-200))
w.dot(50)
w.goto(50, (-200))
w.dot(50)
w.goto((-50), (-250))
w.dot(35)
w.goto(50, (-250))
w.dot(35)
w.goto((-50), (-300))
w.dot(20)
w.goto(50, (-300))
w.dot(20)
elif (C == '贵宾级'):
print('您选择了贵宾级,消耗1万亿RMB')
print('消费成功!即将起飞!!!')
w.penup()
w.goto((-50), (-200))
w.dot(50)
w.goto(50, (-200))
w.dot(50)
w.goto((-50), (-250))
w.dot(35)
w.goto(50, (-250))
w.dot(35)
w.goto((-50), (-300))
w.dot(20)
w.goto(50, (-300))
w.dot(20)
else:
print('对不起,请您输入正确的选项,谢谢。')
b()
print('欢迎来到航空科技馆,我是解说员小苏,接下来我们开启今天的旅程吧!(前图引用了别人的作品,有改动)')
print('我们来到宇宙飞船发射处。', '您可以选择入场票的等级(有普通,中等,绅士,高级,&贵宾级)')
print('普通只能有金属座位(1000000RMB),中等有银座的椅子和普通的木质的床(10000000RMB),绅士有金做的椅子和大的松软棉花床(100000000RMB),高级有金做的椅子(2个,可以夫妻或妻儿,500000000RMB)')
print('贵宾级有一个大别墅(具体的就不用说了反正是喵豪华的,喵00RMB)')
b()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn