Commit 3e1dfe61 by BellCodeEditor

save project

parent 8df5315b
Showing with 12 additions and 8 deletions
...@@ -2,10 +2,14 @@ student1={"语文":91,"数学":88,"英语":85} ...@@ -2,10 +2,14 @@ student1={"语文":91,"数学":88,"英语":85}
student2={"语文":94,"数学":82,"英语":81} student2={"语文":94,"数学":82,"英语":81}
student3={"语文":93,"数学":81,"英语":82} student3={"语文":93,"数学":81,"英语":82}
score={'小王':student1,'小李':student2,'小贝':student3} score={'小王':student1,'小李':student2,'小贝':student3}
b=input("你想查谁的成绩") while True:
print("*"*20) print("退出请按q")
if b in score: b=input("你想查谁的成绩")
for i ,a in score[b].items(): print("*"*20)
print(i,a) if b in score:
else: for i ,a in score[b].items():
print("没有这个人") print(i,a)
\ No newline at end of file elif b=="q":
break
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