Commit e5c76543 by BellCodeEditor

auto save

parent 5318abd8
Showing with 9 additions and 1 deletions
......@@ -4,5 +4,5 @@ dict_hero={'赵一':30,'丁二':37,'孙五':52,'王猛':100}
#print(len(dict_hero))
print(dict_hero)
print(dict_hero['丁二'])
dict_hero['周亮']=32
dict_hero['王猛']=32
print(dict_hero)
\ No newline at end of file
dict= {'可口可乐':3,'旺仔牛奶':1,'辣条':0.5,'巴西烤肉':2,'果冻':0.1}
k=input('你想买什么呀?')
if k in dict:
print('叮咚~您的'+k+'需要支付'+str(dict[k])+'元~')
else:
print('没有,敬请期待~')
\ 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