Commit 6d31526e by BellCodeEditor

save project

parent 336834a1
Showing with 10 additions and 5 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
k=input("你想要买什么呀?")
l=input("你想要几个呀?")
k=input("请输入货品名:")
l=input("请输入价格:")
if k in dict:
print("叮~咚!您点的"+k+"好了,请支付"+str(dict[k]*2)+"元。")
if dict[k]<int(l):
dict[k]=int(l)
print("你好!您的"+k+"已更新")
if dict[k]>int(l):
print("对不起,您的"+k+"没更新")
else:
print("对不起,您点的东西神奇百货中没有。")
\ No newline at end of file
dict[k]=int(l)
print("你好!您的"+k+"已更新")
\ 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