Commit aab7b537 by BellCodeEditor

save project

parent 6572c7d8
Showing with 9 additions and 2 deletions
...@@ -4,9 +4,16 @@ student3 = {'语文': 95, '数学': 100, '英语': 93} ...@@ -4,9 +4,16 @@ student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
name = input("名字:")
for k,v in score[name].items(): while True:
name = input("名字:"+'如要退出请输入p')
if name in score:
for k,v in score[name].items():
print(k,v) print(k,v)
elif name=='p':
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