Commit 23b7199b by BellCodeEditor

save project

parent 2454531d
Showing with 13 additions and 0 deletions
dict={'苹果':200,'香蕉':20,'葡萄':88,'桃子':20,'栗子':68}
key=input("今天吃什么水果?")
price=input("价格多少?")
if key in dict:
if float(price) > dict[key]:
print("涨价了")
if float(price) < dict[key]:
print("降价了不买了")
else:
print(key+"的价钱"+price+"元已上传")
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