Commit 80e9060d by BellCodeEditor

save project

parent 2319fca5
Showing with 14 additions and 0 deletions
dict={"可乐":3"咖啡":6,"牛奶":4"冰红茶":3.5"奶茶":5"矿泉水":1"脉动":4.5} dict={"可乐":3"咖啡":6,"牛奶":4"冰红茶":3.5"奶茶":5"矿泉水":1"脉动":4.5}
k=input("请输出你想买得饮料") k=input("请输出你想买得饮料")
if k in dict: if k in dict:
......
dict={"可乐":3"咖啡":6,"牛奶":4"冰红茶":3.5"奶茶":5"矿泉水":1"脉动":4.5}
k=input("请输出饮料名称")
v=input("请输出饮料价钱")
if k in cost:
if float(v)<cost[k]:
cost[k]=float(v)
print("好的,"+k+"现在"+v+"元")
else:
print("好的,"+k+"现在"+v+"元")
else:
cost[k]=float(v)
print(k+'的价钱'+v+'元已上传~~~')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment