Commit e4b5b220 by BellCodeEditor

save project

parent f0c715f8
Showing with 19 additions and 0 deletions
student1 = {'语文': 121, '数学': 108, '英语': 105}
student2 = {'语文': 147, '数学': 118, '英语': 140}
student3 = {'语文': 135, '数学': 150, '英语': 123}
score = {'小白': student1, '猪灵': student2, '末影龙': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
while True:
print("退出按q")
name = input("名字:")
print('*'*30)
if name in score :
score = score[name]
for k,v in score.items():
print(k,v)
elif (name=="q"):
break
else:
print('输入错误,请再次输入。')
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