From 577be51173d0172185e3cf820bd29935b31f9b46 Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Sat, 12 Sep 2020 10:39:39 +0800
Subject: [PATCH] save project

---
 diy3.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/diy3.py b/diy3.py
index 5365a52..1b6d2df 100644
--- a/diy3.py
+++ b/diy3.py
@@ -5,7 +5,12 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
 
 
 name = input("名字:")
-
-# 查询并打印出输入的名字对应的所有科目的成绩
-for k,v in score[name].items():
-    print(k,v)
+if name in score:
+    print("*"*30)
+    # 查询并打印出输入的名字对应的所有科目的成绩
+    for k,v in score[name].items():
+        
+        print(k,v)
+    print("*"*30)
+else:
+    print("错误,请重新输入")
\ No newline at end of file
--
libgit2 0.25.0