Commit 1c502a48 by BellCodeEditor

save project

parent 5fa7aa07
Showing with 8 additions and 4 deletions
...@@ -3,14 +3,18 @@ student2 = {'语文': 9, '数学': 9, '英语': 9} ...@@ -3,14 +3,18 @@ student2 = {'语文': 9, '数学': 9, '英语': 9}
student3 = {'语文': 9, '数学': 1, '英语': 9} student3 = {'语文': 9, '数学': 1, '英语': 9}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True: while True:
print('退出点q')
k = input("你要查询谁的成绩?") k = input("你要查询谁的成绩?")
if k in score: if k in score:
print('*'*15) print('*'*15)
info = score[k] info = score[k]
for k,v in info.items(): for k,v in info.items():
print(k,v) print(k,v)
print('*'*15) print('*'*15)
elif k == 'q':
break
else: else:
print('你在开玩笑吗') print('你在开玩笑吗')
# 查询并打印出输入的名字对应的所有科目的成 # 查询并打印出输入的名字对应的所有科目的成
print('比'*5) print('qqq比'*5)
print('比'*5) print('qqq比'*5)
\ No newline at end of file \ 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