Commit ed3e7d80 by BellCodeEditor

auto save

parent 0ea626c3
Showing with 13 additions and 1 deletions
...@@ -3,4 +3,15 @@ goods.pop("农夫山泉") ...@@ -3,4 +3,15 @@ goods.pop("农夫山泉")
print(goods) print(goods)
# 请将"农夫山泉"删掉,并打印出新的商品信息 # 请将"农夫山泉"删掉,并打印出新的商品信息
while True:
a=input('请输入要查询的商品名称:(按Q/q键退出)')
print("*"*30)
if a in goods:
print("您查询的商品:",a)
print("单价是:",goods[a])
print("*"*30)
elif a == 'q' or 'Q':
print('退出查询')
break
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