Commit faf92cef by BellCodeEditor

save project

parent 62692a77
Showing with 19 additions and 0 deletions
student1 = {'语文': 52, '数学': 46, '英语': 25}
student2 = {'语文': 23, '数学': 62, '英语': 54}
student3 = {'语文': 52, '数学': 13, '英语': 23}
score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True:
name = input("名字:")
print("*"*30)
if name in score:
score = score[name]
for k, v in score.items():
print(k, v)
print("*" * 30)
else name == "q":
break
else:
print("查询错误,请输入正确的名字")
print("*" *30)
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