From e4a386652706c6ce62c0c33057e4be78e3f5bf1b Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 5 Mar 2022 15:19:35 +0800 Subject: [PATCH] save project --- diy3.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/diy3.py b/diy3.py index b0d29b5..539800d 100644 --- a/diy3.py +++ b/diy3.py @@ -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 -- libgit2 0.25.0