Commit e2e1f023 by BellCodeEditor

save project

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