Commit 6e118856 by BellCodeEditor

save project

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