Commit 5217a9f3 by BellCodeEditor

save project

parent 307e05c3
Showing with 8 additions and 4 deletions
......@@ -6,8 +6,11 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
#for k,v in score.items():
name=input("你的名字是什么?")
q=score[name]
a=input("你要查询的学科是什么?")
s=q[a]
print(s)
if name in score:
q=score[name]
a=input("你要查询的学科是什么?")
s=q[a]
print(s)
else:
print ("您输入的名字错误,请检查后再输入姓名,谢谢!")
\ 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