Commit 2db21edb by BellCodeEditor

save project

parent aeac1210
Showing with 15 additions and 0 deletions
student1 = {'语文':99,'数学':98,'英语':92}
student2 = {'语文':77,'数学':87,'英语':52}
student3 = {'语文':89,'数学':98,'英语':72}
score = {'悟空':student1,"小贝":student2,"诺伊":student3}
name = input("请输入姓名:")
print('*'*30)
if name in score:
score = score[name]
for k,v in score.items():
print(k,v)
print('*'*30)
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