Commit 84c58d1f by BellCodeEditor

save project

parent 83b73772
Showing with 10 additions and 0 deletions
cost={'梨':3'红枣':66'桃':5'苹果':2}
a=input("请输入水果")
b=input("请输入价格")
if a in cost:
if float(b)<cost[a]:
cost[a]=float[b]
print(a+"降价了"+"现价"+b+"元")
else:
cost[a] = float(b)
print(a+"涨价了"+"现价"+b+"元")
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