代码如下:
menu={'蒜泥黄瓜':6,'小炒肉':28,'西红柿炒鸡蛋':18,'烤鱼':30,'红烧肉':38,'手撕鸡':45,'熘白菜':12,'三鲜汤':15}
def bill(*dish):
sum=0
print('您的点单')
for i in dish:
print(i)
sum+=menu[i]
print('.......')
print("合计:{}元".format(sum))
def order():
d=input("请输入菜名(逗号分隔):").split(',')
bill(*d)
order()