Commit 8f95895f by BellCodeEditor

save project

parent 7aed54e7
Showing with 53 additions and 0 deletions
dict_fri={'苹果':1,'香蕉':2,'葡萄':3,'西瓜':4,'荔枝':4,'山竹':5}
f=input('输入水果名称')
m=input('输入水果价格')
if f in dict_fri:
if int(m)<dict_fri[f]:
dict_fri[f]=int(m)
print(f+'降价了')
else:
print(f+'涨价了')
else:
dict_fri[f]=int(m)
print(f+'价钱')
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