Commit 9664ce6b by BellCodeEditor

save project

parent 2781bb45
Showing with 1 additions and 1 deletions
...@@ -2,7 +2,7 @@ cost={"苹果":5,"山竹":12,"菠萝":13} ...@@ -2,7 +2,7 @@ cost={"苹果":5,"山竹":12,"菠萝":13}
k=input("你想买啥?:") k=input("你想买啥?:")
v=input("水果价格:") v=input("水果价格:")
if k in cost: if k in cost:
if int(v)<cost[k]: if int(v)<=cost[k]:
cost[k]=int(v) cost[k]=int(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