Commit 91a4a98c by BellCodeEditor

save project

parent 14daf597
Showing with 11 additions and 17 deletions
......@@ -4,22 +4,16 @@ student3 = {'语文': 10, '数学': 80, '英语': 13}
score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True:
name = input("名字:")
if name in score:
print("press 'q' to end code")
print("wow " * 25)
info = score[name]
for a,b in info.items():
print(a,b)
print("wow " * 25)
continue
elif name == "q":
break
else:
print('!' * 50)
print("wrong name!")
print('!' * 50)
print("end code")
name = input("名字:")
if name in score:
print("wow " * 25)
info = score[name]
for a,b in info.items():
print(a,b)
print("wow " * 25)
else:
print('!' * 50)
print("wrong name!")
print('!' * 50)
# 查询并打印出输入的名字对应的所有科目的成绩
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