Commit b9c37768 by BellCodeEditor

save project

parent 4f7882fd
Showing with 13 additions and 8 deletions
...@@ -7,11 +7,16 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3} ...@@ -7,11 +7,16 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
a=input()
if a in score: while True:
print('*'*10) print('退出q')
c=score[a] a=input()
for k,v in c.items(): if a in score:
print('*'*10)
c=score[a]
for k,v in c.items():
print(k,v) print(k,v)
else: elif a=='q':
print('输入错误') break
\ No newline at end of file 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