Commit 70930b3a by BellCodeEditor

save project

parent d63a3289
Showing with 4 additions and 14 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'苹果':5.2,'山竹':12.9,'香蕉':2.4}
k=input('输入水果名')
v=input('输入水果价钱')
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
goods = {'可口可乐':3,'乐事':5}
goods.pop("乐事")
print(goods)
\ 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