Commit 2a131d15 by BellCodeEditor

save project

parent 985ebc71
Showing with 10 additions and 9 deletions
...@@ -5,13 +5,14 @@ score={"悟空":student1,"诺依":student2,"小贝":student3} ...@@ -5,13 +5,14 @@ score={"悟空":student1,"诺依":student2,"小贝":student3}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 # 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
name=input("名字:") name=input("名字:")
print("退出按q") print("退出按q")
if name in score: while True:
if name in score:
a=score[name] a=score[name]
for q,r in a.items(): for q,r in a.items():
print(q,r) print(q,r)
elif name =='q': elif name =='q':
break break
else: else:
print("gun") print("gun")
\ 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