Commit c3c8a7ca by BellCodeEditor

save project

parent 3df92059
Showing with 5 additions and 2 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~ # 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {} dict= {'可口可乐':3,'旺仔牛奶':4}
k=input("你想要什么?") k=input("你想要什么?")
if k in dict: if k in dict:
print() print("有的,"+k+"的价格是"+str(dict[k])+"元")
else:
print("对不起,"+k+"现在缺货")
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