Commit 03a104c4 by BellCodeEditor

save project

parent 05e48008
Showing with 11 additions and 3 deletions
# 直接运行以下代码,说说你的发现:
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
dict_hero['赵一']=10
print(dict_hero)
dict_hero = {'可乐':30,'薯片':37,'奥利给':52,'卫生纸':89}
t=input("你要啥")
if t in dict_hero:
print('你需要的'+t+str(dict_hero[t])+'元')
else:
print("没有,你可以滚了")
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