Commit 5063d833 by BellCodeEditor

save project

parent e6849ffb
Showing with 4 additions and 0 deletions
...@@ -8,11 +8,14 @@ s = {'悟空': student1, '诺依': student2, '小贝': student3} ...@@ -8,11 +8,14 @@ s = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
while True: while True:
i=input("退出请输入q 名字:") i=input("退出请输入q 名字:")
print('*'*30)
if i in s: if i in s:
info=s[i] info=s[i]
for k,v in info.items(): for k,v in info.items():
print(k,v) print(k,v)
print('*'*30)
elif i == 'q': elif i == 'q':
break break
else: else:
print("请重新输入~~~") print("请重新输入~~~")
print('*'*30)
\ 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