Commit 66708da4 by BellCodeEditor

save project

parent 5351b52d
Showing with 11 additions and 6 deletions
...@@ -9,9 +9,14 @@ ...@@ -9,9 +9,14 @@
# sunwu break # sunwu break
#print(list_hero) #print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典 # 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30} dict_hero={'可乐':3.5,'雪碧':3.5,'乐事':6,'辣条':1.5,'水':2}
dict_hero['猴队长']=99 # dict_hero['猴队长']=99
dict_hero['孙悟空']=999 # dict_hero['孙悟空']=999
if'孙悟空'in dict_hero: # if'孙悟空'in dict_hero:
print('大王来了') # print('大王来了')
print(dict_hero) # print(dict_hero)
k=input('你想买什么?')
if k in dict:
print('叮咚~您的'+k+'需要支付'+str(dict[k])+'元~')
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