Commit 636adc84 by BellCodeEditor

save project

parent 7f293e33
Showing with 13 additions and 0 deletions
fruit={'香蕉':1.9,'苹果':2.3}
k=input('名字是什么')
v=input('价钱是多少')
if k in fruit:
if float(v)<fruit[k]:
fruit[k]=float(v)
print(k+'降价了,变成了'+str(float(v))+'元')
else:
print('涨价了,我们不卖')
else:
fruit[k]=float(v)
print(fruit)
\ 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