Commit 5d495840 by BellCodeEditor

auto save

parent a5e2b4dd
Showing with 4 additions and 5 deletions
......@@ -5,11 +5,11 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成
a = input('请输入姓名:')
data = {}
if a in score:
data = score[a]
for k,v in score[a].items():
print('——'*30)
print(k,v)
print('——'*30)
else:
print('没有此名字')
for k,v in data.items():
print(k,v)
\ 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