Commit 991edc29 by BellCodeEditor

save project

parent 962e2e02
Showing with 7 additions and 8 deletions
...@@ -4,13 +4,12 @@ score={'hehe':student1,'haha':student2} ...@@ -4,13 +4,12 @@ score={'hehe':student1,'haha':student2}
while True : while True :
name=input ("你要查询的名字:") name=input ("你要查询的名字:")
if name in score : if name in score :
for k,v in score.items() : for k,v in score[name].items() :
print(k,":",v)
print("*"*30) print("*"*30)
subject=input ("你要查询的科目:") elif name == "q":
c=score[k][subject] break
print(c) else:
continue print("没有这个人")
else:
print("没有这个人")
continue
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