Commit 5d722e20 by BellCodeEditor

save project

parent 97026c34
Showing with 8 additions and 5 deletions
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
# break # break
# print(list_hero) # print(list_hero)
dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
dict_hero["猴七"]=54 dict={"可口可乐":3,"旺仔牛奶":4,"农夫山泉":1}
dict_hero["猴十"]="25" a=input("你想要买什么东西")
print(dict_hero) if a in dict:
\ No newline at end of file print("叮咚~您的"+a+"需要支付"+str(dict[a])+"元")
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