Commit 60b8473a by BellCodeEditor

save project

parent 0ea626c3
Showing with 13 additions and 2 deletions
......@@ -2,5 +2,15 @@ goods = {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西
goods.pop("农夫山泉")
print(goods)
# 请将"农夫山泉"删掉,并打印出新的商品信息
for i,s in goods.items():
print(i,s)
while True:
s=input('你想要什么?按下q/Q键退出')
print('^'*30)
if s in goods:
print(s,goods[s])
print('^'*30)
elif s=='q'or'Q' :
print('已退出')
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