Commit 7ff4d747 by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
fruit={'西瓜':10,'甜瓜':9,'苹果':5,'梨':6}
k=input('水果名:')
v=input('多少钱:')
if k in fruit:
if int(v)>fruit[k]:
fruit[k]=int(v)
print('水果涨价了!')
else:
print('水果没涨价')
else:
fruit[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