Commit ea5d4dba by BellCodeEditor

save project

parent 4dcd3221
Showing with 11 additions and 11 deletions
...@@ -3,16 +3,16 @@ student2={'语文':95,'数学':96,'英语':90} ...@@ -3,16 +3,16 @@ student2={'语文':95,'数学':96,'英语':90}
student3={'语文':89,'数学':100,'英语':99} student3={'语文':89,'数学':100,'英语':99}
score = {"AnFeng":student1,"SB":student2,"NB":student3} score = {"AnFeng":student1,"SB":student2,"NB":student3}
name = input("名字:") name = input("名字:")
if name==AnFeng: # if name==AnFeng:
score["AnFeng"] # score["AnFeng"]
else: # else:
if name==SB: # if name==SB:
score["SB"] # score["SB"]
else: # else:
if name==NB: # if name==NB:
score["NB"] # score["NB"]
# info=score[key] info=score[name]
# for i,z in score.items(): for i,z in info.items():
# print(i,z) print(i,z)
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
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