Commit 94bca1e5 by BellCodeEditor

save project

parent 7f625db3
Showing with 3 additions and 0 deletions
...@@ -8,9 +8,12 @@ while True: ...@@ -8,9 +8,12 @@ while True:
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
if name in score: if name in score:
a=0
info=score[name] info=score[name]
for k,v in info.items(): for k,v in info.items():
print(k,v) print(k,v)
a=a+v
print("总分是"+str(a))
print("*"*30) print("*"*30)
elif name == "q": elif name == "q":
break break
......
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