Commit 36073882 by BellCodeEditor

auto save

parent b289a0f9
Showing with 7 additions and 3 deletions
...@@ -4,11 +4,15 @@ student3 = {'语文': 95, '数学': 100, '英语': 93} ...@@ -4,11 +4,15 @@ student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
a=input("名字:") a=input("名字:")
for k,v in score.items(): for k,v in score.items():
if a==k: if a in score:
print(k,v) print(score[a])
break
else: else:
print("查询错误") print("查询错误")
break break
......
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