Commit 901a93eb by BellCodeEditor

save project

parent 04382474
Showing with 7 additions and 2 deletions
...@@ -10,5 +10,10 @@ for i in range(len(list_hero)): ...@@ -10,5 +10,10 @@ for i in range(len(list_hero)):
print(list_hero) print(list_hero)
''' '''
dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30} dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
dict_hero['猴十']=25 k=input('你想买什么?')
print(dict_hero) if k in dict_hero:
print('你的'+k+'需要'+str(dict_hero[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