Commit 662780e3 by BellCodeEditor

save project

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