Commit 469fa2a2 by BellCodeEditor

save project

parent ea846f82
Showing with 14 additions and 4 deletions
...@@ -5,11 +5,20 @@ score = {'悟空':Student1,'小贝':Student2,'诺伊':Student3} ...@@ -5,11 +5,20 @@ score = {'悟空':Student1,'小贝':Student2,'诺伊':Student3}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 # 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
space = "*"*30 space = "*"*30
name = input("请输入您的名字_") print(space)
if name in score: while True:
info = score[name] name = input("请输入您的名字_")
print(space) print(space)
if name in score:
info = score[name]
for k,v in info.items(): for k,v in info.items():
print(k,v) print(k,v)
else: input("按下Enter键继续")
print(space)
elif name == "/break":
print("系统结束")
break
else:
print("错误:未查询到名字") print("错误:未查询到名字")
input("按下Enter键继续")
print(space)
\ 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