Commit b6df10b5 by BellCodeEditor

save project

parent bdb9eb6d
Showing with 7 additions and 5 deletions
# 直接运行以下代码,说说你的发现:
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
dict_hero = ['诸葛亮':100]
if '诸葛亮' in dict_hero:
print('诸葛亮')
dict={"可口可乐":3,"薯片":4,"辣条":1,"奥利奥":6}
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