Commit ce28c9c6 by BellCodeEditor

save project

parent 45fa4139
Showing with 3 additions and 10 deletions
cost={"苹果":5.2,"山竹":12.9,"香蕉":2.4,"荔枝":15,"葡萄":9.3,"桂圆":8,"蓝莓":10,"李子":8}
a=input("请输入水果名称")
b=input("请输入水果价格")
if a in cost:
if float(b)>int(cost[a]):
cost[a]=float(b)
print(cost[a])
else:
print("不用改变")
else:
print("我没这玩意儿")
cost.pop('蓝莓')
print(cost)
\ 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