Commit c2b08f77 by BellCodeEditor

save project

parent 5f05719c
Showing with 15 additions and 7 deletions
......@@ -7,11 +7,19 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
name=input('姓名:')
if name in score:
score[name]
for q,w in score[name].items():
print(q,w)
else:
print('名字不存在')
while True:
name=input('姓名:')
print('退出按q')
print('*'*8)
if name in score:
score[name]
for q,w in score[name].items():
print(q,w)
elif name=='q':
break
else:
print('名字不存在')
print('*'*8)
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