Commit 1b4b1fa7 by BellCodeEditor

auto save

parent e7aeaf76
Showing with 17 additions and 0 deletions
body1={"姓名":"杰克","性别":"男","年龄":"13"}
body2={"姓名":"苏珊","性别":"女","年龄":"11"}
body3={"姓名":"小贝","性别":"男","年龄":"12"}
info={"杰克":body1,"苏珊":body2,"小贝":body3}
print(info["小贝"]["年龄"])
xiaobei=info["小贝"]
for k,v in xiaobei.items():
print(k,v)
......@@ -5,6 +5,12 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
name = input("名字:")
if name in score:
info=score[name]
for k,v in info.items():
print(k,v)
else:
print("输入的姓名不在系统中")
# 查询并打印出输入的名字对应的所有科目的成绩
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