Commit f227ad5f by BellCodeEditor

auto save

parent c76b8852
Showing with 15 additions and 6 deletions
...@@ -2,8 +2,17 @@ student1 = {'语文':91,'数学':88,'英语':85} ...@@ -2,8 +2,17 @@ student1 = {'语文':91,'数学':88,'英语':85}
student2 = {'语文':89,'数学':85,'英语':99} student2 = {'语文':89,'数学':85,'英语':99}
student3 = {'语文':100,'数学':100,'英语':100} student3 = {'语文':100,'数学':100,'英语':100}
score = {'悟空':student3,'诺依':student2,'小贝':student1} score = {'悟空':student3,'诺依':student2,'小贝':student1}
while True:
name=input("名字") print("查询输入名字,退出输入q")
info = score['悟空'] name=input("名字")
for k,y in info.items(): print('*'*30)
print(k,y) if name in score:
\ No newline at end of file info = score[name]
for k,v in info.items():
print(k,v)
print('*'*30)
elif name =="q":
break
else:
print("不对,没这个人")
print("程序结束")
\ 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