Commit 8bb240dd by BellCodeEditor

save project

parent e333251f
Showing with 2 additions and 1 deletions
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
dict= {'可口可乐':50,'旺仔牛奶':60,'农夫山泉':70,'辣条':80,'巴西烤肉':90,'果冻':100,'乐事':5,'奥利奥':10300,'巧克力':99999,'棒棒糖':1200} dict= {'可口可乐':50,'旺仔牛奶':60,'农夫山泉':70,'辣条':80,'巴西烤肉':90,'果冻':100,'乐事':5,'奥利奥':10300,'巧克力':99999,'棒棒糖':1200}
a=input("你想要买什么?") a=input("你想要买什么?")
if a in dict: if a in dict:
print(a+"需要"+dict[k]+"元") print(a+"需要"+str(dict[a])+"元")
else: else:
print("目前没有"+a) print("目前没有"+a)
\ 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