Commit d952eb36 by BellCodeEditor

save project

parent 83b73772
Showing with 12 additions and 0 deletions
fruit={'西瓜':2,'苹果':3}
k=input("输入要录入的水果吗:")
v=input("输入"+k+"的价格")
if k in fruit:
if int(v)<fruit[k]:
fruit[k]=int(v)
print("已更新最低价格")
else:
print("最低价格没变")
else:
fruit[k]=int(v)
\ 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