Commit add616c0 by BellCodeEditor

save project

parent 2438351f
Showing with 15 additions and 7 deletions
student1 = {'语文': 100, '数学': 100, '英语': 100} #老徐
student2 = {'语文': 100, '数学': 100, '英语': 100} #老邱
student3 = {'语文': 100, '数学': 100, '英语': 100} #老万
score = {'老徐': student1, '老邱': student2, '老万': student3}
score = {'老徐': student1, '老邱': student2, '老万': student3}
name = input("名字:")
# 查询并打印出输入的名字对应的所有科目的成绩
for k,v in score[name]:
print(k,v)
\ No newline at end of file
while True:
print('请输入姓名,退出请输入“q”')
name = input("姓名:")
if name in score:
info = score[name]
print('*'*35)
for k,v in info.items():
print(k,v)
print('*'*35)
elif name == 'q':
break
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