Commit 14468999 by BellCodeEditor

save project

parent 175ec63d
Showing with 23 additions and 3 deletions
w1={'语文':100,'数学':100,'英语':100}
w2={'语文':99.9,'数学':100,'英语':0}
w3={'语文':80,'数学':70,'英语':0}
score={'陈浩鑫':w1,'元亮':w2,'夏课':w3}
while True:
print("请输入你的名字查询,或输入q离开")
y=input('名字')
print("*"*100)
if y in score:
x=score[y]
for k,v in x.items():
print(k,v)
elif y =="q":
break
else:
print("此人不在人世")
print("查询结束")
\ No newline at end of file
goods = {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6} goods = {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
goods.pop("农夫山泉") goods.pop("农夫山泉")
goods['雷碧']=100 for i,v in goods.values():
print(goods)
# 请将"农夫山泉"删掉,并打印出新的商品信息
print(i,v)
# 请将"农夫山泉"删掉,并打印出新的商品信息
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