Commit f4982da0 by BellCodeEditor

save project

parent dc0befe6
Showing with 13 additions and 6 deletions
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={'猴三':10,'猴一':21,'猴五':22}
dict_hero['猴一']=100
dict_hero['adsfgdhfjg']=13243
dict_hero['qawsedfrfvgv']=1234567
print(dict_hero)
a={'苹果':5.2,'山竹':5.1233455653457,'香蕉':2.2,'梨':3.2,'榴莲':100.2,'桂圆':5.2}
s=input('水果名')
d=input('水果价')
if s in a:
if float(d)<a[s]:
a[s]=float(d)
print(s+'降了,现在'+d+'元')
else:
print(s+'涨了,不买')
else:
a[s]=float(d)
print(s+'价'+d+'元。(已上传)')
\ 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