Commit e739ea4b by BellCodeEditor

save project

parent 83b73772
Showing with 18 additions and 0 deletions
furit={"西瓜":10,"草莓":10}
while True:
k=input("水果?")
v=input("价格?")
if k in furit:
if int(v)>furit[k]:
print("涨价")
furit[k]=int(v)
elif int(v)<furit[k]:
print("掉价")
furit[k]=int(v)
elif int(v)==furit[k]:
print("平价")
furit[k]=int(v)
else:
print("首次")
furit[k]=int(v)
\ 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