Commit 687e74c2 by BellCodeEditor

save project

parent 530570ab
Showing with 15 additions and 9 deletions
student1={'语文':50,'数学':12,'英语':13}
student2={'语文':21,'数学':23,'英语':15}
student3={'语文':25,'数学':26,'英语':17}
score={"秦武王",'student1',"楚昭王",'student2',"宋襄公",'student3'}
name=input("姓名:")
print("*"*30)
if name in score:
info=score(name)
for k,v in info.items():
print(k,v)
score={'秦武王':student1,'楚昭王':student2,'宋襄公':student3}
while 1:
print('请输入要查询的名字,要退出请按q')
name=input("姓名:")
print("*"*30)
else:
print("查询错误,请输入正确的名字")
if name in score:
i=score[name]
for k,v in i.items():
print(k,v)
print("*"*30)
elif name=="q":
break
else:
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