Commit 37a3f411 by BellCodeEditor

save project

parent 6cb56730
Showing with 16 additions and 11 deletions
...@@ -2,16 +2,20 @@ student1 = {'语文': 91, '数学': 88, '英语': 85} ...@@ -2,16 +2,20 @@ student1 = {'语文': 91, '数学': 88, '英语': 85}
student2 = {'语文': 97, '数学': 98, '英语': 90} student2 = {'语文': 97, '数学': 98, '英语': 90}
student3 = {'语文': 95, '数学': 100, '英语': 93} student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True:
exit_door=input("是否继续查询?(继续查询请按除“q”的任意键。)")
name = input("名字:") if exit_door!='q':
if name in score: name=input("名字:")
product=score[name] if name in score:
print("*"*50) product=score[name]
for s,b in product.items(): print("*"*50)
print(s,b) for s,b in product.items():
print("*"*50) print(s,b)
else: print("*"*50)
print("你他娘的给我输正确的名字!!!") else:
print("你他娘的给我输正确的名字!!!")
else:
break
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