Commit acc993d0 by BellCodeEditor

save project

parent b8a2b536
Showing with 11 additions and 6 deletions
......@@ -7,9 +7,14 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
a=input("你的名字:")
if a in score:
for k,l in score[a].items():
print(k,l)
else:
print("这里没有该名字。")
while True:
a=input("你的名字:")
print("*"*30)
if a in score:
for k,l in score[a].items():
print(k,l)
print("*"*30)
elif a == 'q':
break
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