Commit 96dfeefa by BellCodeEditor

save project

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