Commit efb82537 by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
while True:
dict={'西瓜':2,'葡萄':5,}
k=input("输入水果名")
v=input("输入"+k+"的价格")
if k in dict:
if int(v)<dict[k]:
dict[k]=int(v)
print("最低价格已更新")
else:
print("最低价没变")
else:
dict[k]=int(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