Commit e87c6932 by BellCodeEditor

save project

parent 74198382
Showing with 20 additions and 4 deletions
score = {'语文':96,'数学':105,'英语':98} student1 = {'语文':96,'数学':105,'英语':98}
for k,v in score.items(): student2 = {'语文':88,'数学':91,'英语':93}
print(k,v) student3 = {'语文':98,'数学':94,'英语':89}
\ No newline at end of file score = {'李孟刚':student1, '朱宸霖':student2, '倪子涵':student3,}
while True:
print("请输入要查询的名字,退出请输入q")
name = input("名字: ")
print("-"*30)
if name in score:
score = score[name]
for k,v in score.items():
print(k, v)
print("-"*30)
elif name == "q":
break
else:
print("查询错误,请重新输入")
print("-"*30)
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