Commit 83363e1a by BellCodeEditor

save project

parent 196c0e0c
Showing with 6 additions and 1 deletions
......@@ -8,9 +8,13 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
while True:
i=input("你想要查谁的成绩")
i=input("你想要查谁的成绩(退出请按Q)")
if i in score:
print("*"*20)
for x,y in score[i].items():
print(x,y)
print("*"*20)
elif i == "q" or i == "Q":
exit()
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