Commit 89e3241f by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
l={'苹果':9,'梨':5,'橘子':3}
k=input('输入水果名:')
v=input('输入'+k+'价格')
if k in l:
if int(v)<l[k]:
l[k]=int(v)
print('已更新水果价格')
else:
print('水果价格比之前高')
else:
l[k]=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