Commit f49f2510 by BellCodeEditor

save project

parent 6336dafc
Showing with 14 additions and 0 deletions
dict= {"可口可乐":3,"牛奶":4,"水":1,"辣条":3}
k=input("这个东西是什么?")
v=input("它要多少钱?")
if k in dict:
if int(v) > dict[k]:
dict[k] = int(v)
print("太贵了,不要")
else:
print("我买了")
else:
dict[k]=v
print("您的水果信息已上传")
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