Commit e4a38665 by BellCodeEditor

save project

parent 7c20511b
Showing with 5 additions and 0 deletions
......@@ -3,6 +3,7 @@ student2 = {'语文':95,'数学':99,'英语':88}
student3 = {'语文':0,'数学':100,'英语':84}
score = {'悟空':student1,'诺依':student2,'小贝':student3}
while True:
print('请输入要查询的名字,退出请输入q')
name = input('查询姓名:')
if name in score:
a=score[name]
......@@ -10,6 +11,9 @@ while True:
for k,v in a.items():
print(k,v)
print('*'*30)
elif name=='q':
print('系统已退出')
break
else:
print('姓名不存在,请重新输入')
print('*'*30)
\ 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