Commit c7c98b39 by BellCodeEditor

auto save

parent 5ab88987
Showing with 14 additions and 5 deletions
score = {'语文':91,'数学':88,'英语':85}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
stu1 = {'语文':100,'数学':100,'英语':100}
stu2 = {'语文':99,'数学':99,'英语':100}
stu3 = {'语文':89,'数学':93.5,'英语':98}
score = {'神':stu1,'鬼':stu2,'人':stu3}
name = input("名字:")
print("*"* 30)
if name in score:
score = score[name]
info = score[name]
else:
print("没有此名字!")
for k,v in info.items():
print(k,v)
\ 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