Commit 336e5101 by BellCodeEditor

save project

parent ecd97c4e
Showing with 26 additions and 2 deletions
cost={'pg':3,'lz':1,'xj':4}
\ No newline at end of file
cost={'pg':3,'lz':1,'xj':4}
k=input('水果民')
v=input('水果多少钱')
if k in cost:
if float(v)<cost[k]:
cost[k]=float(v)
print(k+'降价了,现价'+v+'元')
else:
print(k+'不买了')
else:
cost[k]=float(v)
print(k+'的价钱'+v+'已上传')
# cost={'pg':3,'lz':1,'xj':4}
# k=input('水果民')
# v=input('水果多少钱')
# if k in cost:
# if float(v)<cost[k]:
# cost[k]=float(v)
# print(k+'减价了,要'+v+'元')
# else:
# print(k+'不买了')
# else:
# cost[k]=float(v)
# print(k+'的价钱'+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