Commit 3e35f54f by BellCodeEditor

save project

parent 06a3e474
Showing with 6 additions and 4 deletions
...@@ -6,8 +6,10 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3} ...@@ -6,8 +6,10 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
name = input("名字:") name = input("名字:")
print(name) print(name)
# 查询并打印出输入的名字对应的所有科目的成绩 if name in score:
j = score[name] j = score[name]
for k,v in j.items(): for k,v in j.items():
print(k,v) print(k,v)
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