Commit cbb2b2ce by BellCodeEditor

save project

parent fd37ddb5
Showing with 4 additions and 1 deletions
...@@ -5,13 +5,16 @@ syude={"五":score,"期":score1,"就":score2} ...@@ -5,13 +5,16 @@ syude={"五":score,"期":score1,"就":score2}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 # 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
while True: while True:
name=input("名字:") print("请输入要查询的名字,退出请输入q")
name=input("姓名:")
if name in syude: if name in syude:
a=syude[name] a=syude[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) print('*'*30)
elif name=="q":
break
else: else:
print('输入错误') print('输入错误')
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