Commit 4e42b024 by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
jiage={"苹果":8,"香蕉":5,"樱桃":10}
sg=input("请输入一个水果:")
jg=input("请输入它的价格:")
if sg in jiage:
if int(jg)<jiage[sg]:
jiage[sg]=sg
print("降价了,可以购买了。")
else:
print("涨价了,先不买。")
else:
jiage[sg]=int(jg)
print(jiage)
\ 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