Commit fb23240b by BellCodeEditor

save project

parent f66f2f6f
Showing with 8 additions and 1 deletions
...@@ -4,10 +4,16 @@ student3 = {'语文': 95, '数学': 100, '英语': 93} ...@@ -4,10 +4,16 @@ student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True: while True:
name = input("输入查询内容") name = input("输入查询内容,退出按q")
if name =="q":
print("正在退出")
break
if name in score: if name in score:
s=score[name] s=score[name]
for k,v in s.items(): for k,v in s.items():
print(name+"的",k,v) print(name+"的",k,v)
break
else: else:
print("信息有误,重新输入") 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