Commit 4c99ce7f by BellCodeEditor

save project

parent 920ac4b2
Showing with 14 additions and 7 deletions
S1 = {'','',}
score = {'悟空':S1,'小贝':S2,'诺伊'S3:}
Student1 = {'语文':46,'数学':37,'英语':52}
Student2 = {'语文':122,'数学':145,'英语':140}
Student3 = {'语文':106,'数学':135,'英语':132}
score = {'悟空':Student1,'小贝':Student2,'诺伊':Student3}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
for k,v in score.items():
print(k,v)
space = "*"*30
name = input("请输入您的名字_")
if name in score:
info = score[name]
print(space)
for k,v in info.items():
print(k,v)
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