Commit dfede415 by BellCodeEditor

save project

parent 431d825c
Showing with 2 additions and 0 deletions
...@@ -7,6 +7,8 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3} ...@@ -7,6 +7,8 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
name = input("请输入需要查询的名字:")
a - score[name]
a=score["悟空"] a=score["悟空"]
for i,o in a.items(): for i,o in a.items():
print(i,o) print(i,o)
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