Commit a4af5eb0 by BellCodeEditor

auto save

parent c705435f
Showing with 26 additions and 0 deletions
fruit = {
"苹果":2.3,"桃子":4.9, "柠檬":9.9, "香蕉":5.0
}
fruit["苹果"] = 8.0
fruit["fdsia"] = 9.0
# print(fruit)
a = input("请输入查找的水果")
b = input("请输入水果价格")
if a in fruit:
# print(fruit[a])
if fruit[a] > float(b):
print("便宜了,快去买")
else:
print("涨价了,过几天再买")
else:
fruit[a] = float(b)
print(fruit)
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