Commit 56423c9f by BellCodeEditor

auto save

parent 0ea626c3
Showing with 30 additions and 3 deletions
goods = {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
goods.pop("农夫山泉")
print(goods)
#goods = {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
#del goods
#goods.pop("农夫山泉")
#print(goods)
# 请将"农夫山泉"删掉,并打印出新的商品信息
# score={'語文':91,'數學':88,'英語':85}
# for i in score.values():
# print(i)
student1={'語文':91,'數學':88,'英語':85}
student2={'語文':97,'數學':78,'英語':95}
student3={'語文':77,'數學':100,'英語':99}
score={'ii':student1,'ll':student2,'kk':student3}
while True:
print('請輸入名字')
name = input('名字:')
print('*'*30)
if name in score:
info = score[name]
for k,v in info.items():
print(k,v)
print('*'*30)
elif name == "q":
break
else:
print('查詢錯誤,請輸入正確的名字')
print('*'*30)
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