Commit 0bd48261 by BellCodeEditor

save project

parent 5ab88987
Showing with 679 additions and 2 deletions
score = {'语文':91,'数学':88,'英语':85} # score = {'语文':91,'数学':88,'英语':85}
# score.items()
# for k,v in score.items():
# print(k,":",v)
sj1 = {'语文':93.5,'数学':98,'英语':94}
sj2 = {'语文':98,'数学':96,'英语':95}
sj3 = {'语文':99.5,'数学':100,'英语':100}
dan = {"向荣熙":sj1,"坤坤":sj2,"原神":sj3,}
while True:
s = input("名字:")
if s in dan:
print("*"*30)
for k,v in dan[s].items():
print(k,":",v)
print("*"*30)
else:
print("名字错误")
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
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