用户:
GEAkiller920查看:0 回复:0 评论:0 创建时间:2023-12-17T09:43:25
【作品展示】

【作品介绍】
吃点东西吧
【作品源代码】
import time as t
tem = 1
eas = 0
ers = ''
ten = '汉堡,只因肉卷,牛肉面,三明治,炒饭'
six = '薯条,沙拉,花生米,可乐,柠檬茶,紫菜汤'
first = '汉堡,薯条,可乐'
secrond = '只因肉卷,沙拉,柠檬茶'
print('十元份', ten, sep = ':')
t.sleep(0.5)
print('六元份', six, sep = ':')
t.sleep(0.5)
print('套餐1', first, '二十元/份')
t.sleep(0.5)
print('套餐2', secrond, '二十元/份')
t.sleep(2)
eat = input('是否选择套餐?(是或否)')
if eat == '是':
eeat = int(input('请选择套餐1或套餐2:'))
if eeat == 1:
print(first)
elif eeat == 2:
print(secrond)
t.sleep(1)
print('总计20元')
else:
print('最多三种食物,每次输入一个食物')
mes = ''
for i in range(3):
mes = input('请输入第' + str(tem) + '种食物:')
if mes in six:
ers += mes,(",")
eas += 6
else:
ers += mes, (",")
eas += 10
int(tem)
tem +=1
print(ers, '共', eas, '元')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn