基本信息
源码名称:餐厅管理器源代码【文字界面】
源码大小:3.29KB
文件格式:.py
开发语言:Python
更新时间:2020-11-06
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 5 元×
微信扫码支付:5 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
分享一个实用的作品^-^ ^-^
def fun1():
for i in menu:
print('菜品:%s,价格:%.2f元' % (i[0], i[1]))
def fun2():
for x, i in enumerate(menu, start=1):
print('{} {} '.format(x, i[0]))
while True:
b = int(input('请输入您选择的菜品编号,退出输入-1:'))
if b == -1:
break
select.append(menu[b - 1])
def fun3():
total = 0
print('您已点菜品为:')
for i in select:
# print(i)
print(i[0], i[1])
total = total i[1] # total = i[1]
print('顾客您好,您本次消费%.2f元' % (total))
# 100 打五折 50-100 抹零 50以下没有优惠
money = 0.0
if total >= 100: # 打折
money = total * 0.5
print('消费满100打五折,您实际消费:%.2f元' % (money))
elif total >= 50: # 抹零
money = total // 10 * 10
print('消费50-100之间抹零,您实际消费%.2f元' % (money))
else:
money = total
# 输入顾客的付款金额
pay = float(input('请输入顾客的付款金额:'))
print('谢谢,找零:%.2f元' % (pay - money))
def fun4():
# 输入顾客的留言
word = input('请留下您宝贵的意见:')
# 讲留言添加到留言列表中
messages.append(word)
# 选择是否查看留言
t = input('输入1查看所有留言,其他退出').strip()
if t == '1':
# 查看所有留言
for i in messages:
print(i)
def fun5():
for x, i in enumerate(menu):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 输入要修改的菜品的编号
b = int(input('请输入要修改的菜品的编号:'))
# 输入菜名和价格
name = input('请输入新菜名:')
price = int(input('请输入价格:'))
# 修改
menu[b - 1] = (name, price)
def fun6():
for x, i in enumerate(select):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 询问是删除还是增加
quest = input('请问是删除(0)还是增加(1)').strip()
# 判断执行不同的操作
if quest == '0':
b = int(input('请输入要删除的编号:'))
select.pop(b - 1)
elif quest == '1':
# 显示饭店菜单
for x, i in enumerate(menu):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 输出要增加的菜品编号
b = int(input('请输入要增加的编号:'))
select.append(menu[b - 1])
分享一个实用的作品^-^ ^-^
def fun1():
for i in menu:
print('菜品:%s,价格:%.2f元' % (i[0], i[1]))
def fun2():
for x, i in enumerate(menu, start=1):
print('{} {} '.format(x, i[0]))
while True:
b = int(input('请输入您选择的菜品编号,退出输入-1:'))
if b == -1:
break
select.append(menu[b - 1])
def fun3():
total = 0
print('您已点菜品为:')
for i in select:
# print(i)
print(i[0], i[1])
total = total i[1] # total = i[1]
print('顾客您好,您本次消费%.2f元' % (total))
# 100 打五折 50-100 抹零 50以下没有优惠
money = 0.0
if total >= 100: # 打折
money = total * 0.5
print('消费满100打五折,您实际消费:%.2f元' % (money))
elif total >= 50: # 抹零
money = total // 10 * 10
print('消费50-100之间抹零,您实际消费%.2f元' % (money))
else:
money = total
# 输入顾客的付款金额
pay = float(input('请输入顾客的付款金额:'))
print('谢谢,找零:%.2f元' % (pay - money))
def fun4():
# 输入顾客的留言
word = input('请留下您宝贵的意见:')
# 讲留言添加到留言列表中
messages.append(word)
# 选择是否查看留言
t = input('输入1查看所有留言,其他退出').strip()
if t == '1':
# 查看所有留言
for i in messages:
print(i)
def fun5():
for x, i in enumerate(menu):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 输入要修改的菜品的编号
b = int(input('请输入要修改的菜品的编号:'))
# 输入菜名和价格
name = input('请输入新菜名:')
price = int(input('请输入价格:'))
# 修改
menu[b - 1] = (name, price)
def fun6():
for x, i in enumerate(select):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 询问是删除还是增加
quest = input('请问是删除(0)还是增加(1)').strip()
# 判断执行不同的操作
if quest == '0':
b = int(input('请输入要删除的编号:'))
select.pop(b - 1)
elif quest == '1':
# 显示饭店菜单
for x, i in enumerate(menu):
print('编号:{},菜品信息:{}'.format(x 1, i))
# 输出要增加的菜品编号
b = int(input('请输入要增加的编号:'))
select.append(menu[b - 1])