Commit 70930b3a by BellCodeEditor

save project

parent d63a3289
Showing with 4 additions and 14 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~ goods = {'可口可乐':3,'乐事':5}
dict= {'苹果':5.2,'山竹':12.9,'香蕉':2.4} goods.pop("乐事")
k=input('输入水果名') print(goods)
v=input('输入水果价钱') \ No newline at end of file
if k in dict:
if int(v)<dict[k]:
print(k+'降价了,现在'+v+'元')
else:
print(k+"涨价了")
else:
dict[k] = float(v)
print(k+"第一次已上传")
\ 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