Commit 4ae37ab0 by BellCodeEditor

save project

parent 83b73772
Showing with 13 additions and 0 deletions
a={'苹果':5.2,'山竹':12.9}
b=input('请输入水果名称:')
c=input('请输入水果价格:')
if b in a:
if float(c)<a[b]:
a[b]=float(c)
print(b+"降价了,现价"+c+"元")
else:
print(b+'涨价了,我们不买')
else:
a[b]=float(c)
print(b+"的价钱"+c+"已上传")
\ 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