Commit 632feabc by BellCodeEditor

save project

parent b464314d
Showing with 7 additions and 3 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} student1 = {'语文': 91, '数学': 88, '英语': 85}
student2 = {'语文': 97, '数学': 98, '英语': 90} student2 = {'语文': 97, '数学': 98, '英语': 90}
student3 = {'语文': 95, '数学': 100, '英语': 93} student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
a=input("你的名字:")
while True: while True:
print("退出输入Q")
a=input("你的名字:")
if a in score: if a in score:
p=score[a] p=score[a]
for i,e in p.items(): for i,e in p.items():
print(i,e) print(i,e)
continue
elif a=="q":
break break
else: else:
print("没有此名,请输入正确的名字") print("没有此名,请输入正确的名字")
break
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