Commit 51e10925 by BellCodeEditor

save project

parent c71b1316
Showing with 14 additions and 4 deletions
cost={'苹果';5} cost={'苹果':5,'山竹':1.29}
cost={'苹果';5} cost={'苹果':5,'山竹':1.29}
print(cost) k=input('名称?:')
\ No newline at end of file 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