Commit 8d5388bf by BellCodeEditor

save project

parent 640f8ac2
Showing with 19 additions and 13 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} student1 = {'语文': 74, '数学': 88, '英语': 95}
student2 = {'语文': 97, '数学': 98, '英语': 90} student2 = {'语文': 62, '数学': 76, '英语': 81}
student3 = {'语文': 95, '数学': 100, '英语': 93} student3 = {'语文': 99, '数学': 100, '英语': 100}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'天乐': student1, '帅傲': student2, '丁默': student3}
name = input("请输入需要查询的学员名称:") print('退出请按q')
if name in score: while True:
info = score[name] name = input("请输入需要查询的学员名称:")
print("*"*30) if name in score:
for k,v in info.items(): info = score[name]
print(k,v) print("*"*30)
print("*"*30) for k,v in info.items():
else: print(k,v)
print("查无此人!") print("*"*30)
elif name == "q":
break
else:
print("查无此人!")
continue
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