Commit 119b0d67 by BellCodeEditor

save project

parent b0c15db5
Showing with 14 additions and 0 deletions
cost={'苹果':5,'香蕉':3,'山竹':10}
k=input("请输入你想要的水果")
v=input("请输入水果价格")
if k in cost:
if int(v)<cost[k]:
cost[k]=int(v)
print("降价喽!")
else:
print("涨价了")
else:
cost[k]=int(v)
print("有新商品了")
\ 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