Commit 231fa7c5 by BellCodeEditor

save project

parent 418b3aa0
Showing with 1 additions and 1 deletions
...@@ -2,7 +2,7 @@ cost={'苹果':5.2,'山竹':12.9,'香蕉':2.5} ...@@ -2,7 +2,7 @@ cost={'苹果':5.2,'山竹':12.9,'香蕉':2.5}
k=input('你想买什么?') k=input('你想买什么?')
v=input('水果价格') v=input('水果价格')
if k in cost: if k in cost:
if float(v)<cost[k]: if float(v)<cost[k]:
cost[k]=float(v) cost[k]=float(v)
print('水果'+k+'最近价格已更新为'+v+'元') print('水果'+k+'最近价格已更新为'+v+'元')
else: else:
......
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