Commit 9efb39d4 by BellCodeEditor

save project

parent aec16236
Showing with 10 additions and 5 deletions
......@@ -5,12 +5,17 @@ score = {'悟空':score1,'小贝':score2,'诺依':score3}
name=input("请输入您的名字:")
print("*"*30)
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
info=score[name]
for k,v in info.items():
print(k,v)
if name in score:
info=score[name]
for k,v in info.items():
print(k,v)
print("*"*30)
else:
print("提示:名字错误,请重新输入:")
print("*"*30)
......
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