Commit ae3e9255 by BellCodeEditor

save project

parent 86521567
Showing with 4 additions and 1 deletions
...@@ -5,11 +5,13 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3} ...@@ -5,11 +5,13 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
name = input("名字:") name = input("名字:")
print("*"*30)
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
if name in score: if name in score:
t=score[name] t=score[name]
for i,m in t.items(): for i,m in t.items():
print(i,m) print(i,m)
print("*"*30)
else: else:
print("该考生不存在,请重新输入!") print("该考生不存在,请重新输入!")
print("*"*30)
\ 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