Commit e0a5d0c6 by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
food={"香蕉":3,"西瓜":5}
k=input("写出水果名")
p=input("写出水果价格")
if k in food:
if int(p)<food[k]:
food[k]=int(p)
else:
print("比之前便宜")
else:
food[k]=int(p)
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