Commit 247a8e8f by BellCodeEditor

save project

parent 83b73772
Showing with 14 additions and 0 deletions
f={"西瓜":5,"橘子":6}
while True:
k=input("输入水果名字")
v=input("输入水果价格")
if k in f:
if int(v)<f[k]:
f[k]=int(v)
print("降价了")
else:
print("没变")
else:
f[k]=int(v)
print("已添加新水果")
\ 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