Commit 23bb9253 by BellCodeEditor

save project

parent cacb92e4
Showing with 6 additions and 6 deletions
...@@ -4,15 +4,15 @@ student3 = {'语文': 95, '数学': 100, '英语': 93} ...@@ -4,15 +4,15 @@ student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
if name in score: if name in score:
while True:
name = input("名字:") name = input("名字:")
if name in socre() if "name" in socre()
print("退出请输入q") print("如果查询成绩完毕,需要退出考生期末考试程序,退出请输入q")
for c,v in score[student1],[student2],[student3].items(): for c,v in score[[student1][student2][student3]].items():
print(c,v) print(c,v)
elif:name=="q" elif:name=="q"
break break
else: else:
print("输入的名字不在考试生内,请重新输入") 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