Commit d5f55461 by BellCodeEditor

save project

parent 65f6214c
Showing with 7 additions and 0 deletions
...@@ -10,12 +10,18 @@ for k,v in xs.items(): ...@@ -10,12 +10,18 @@ for k,v in xs.items():
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
while True : while True :
print("请输入名字,若要推出请按q")
print('*'*30)
name = input("名字:")#查询 name = input("名字:")#查询
if name in score : if name in score :
a = score[name] a = score[name]
print('*'*30)#*为翻倍符 print('*'*30)#*为翻倍符
for k,v in a.items():#找到对应值并打印 for k,v in a.items():#找到对应值并打印
print(k,v) print(k,v)
print('*'*30)
elif name=="q" :
break break
else: else:
print('输入错误') 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