Commit d6b98e09 by BellCodeEditor

save project

parent f0c715f8
Showing with 20 additions and 0 deletions
student1 = {'语文':99,'数学':98,'英语':92}
student2 = {'语文':77,'数学':87,'英语':52}
student3 = {'语文':89,'数学':98,'英语':72}
score = {"悟空":student1,"小贝":student2,"诺伊":student3}
print('*'*30)
while True:
name = input("请输入姓名:")
print('*'*30)
if name in score:
data = score[name]
for k,v in data.items():
print(k,v)
print('*'*30)
elif name == 'q':
print("系统已退出!")
break
else:
print("学生不存在,重新输入!")
print('*'*30)
\ 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