Commit 646efcd9 by BellCodeEditor

save project

parent 83b73772
Showing with 12 additions and 0 deletions
fruit = {"苹果":6,"梨":8,"葡萄":2,"西瓜":6,"榴莲":8}
k = input("水果")
v = input("价格")
if k in fruit:
if fruit[k]<int(v):
print("涨价了")
else:
print("降价了")
else:
fruit[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