Commit 7ef11c27 by BellCodeEditor

save project

parent 9c5b877f
Showing with 20 additions and 9 deletions
score = {'语文':91,'数学':89,'英语':85}
s=input('请输入您想查询的科目成绩:')
if s in score:
print('*'*30)
#for k,v in score.items():
#print(k,v)
print(score[s])
print('*'*30)
\ No newline at end of file
stu1 = {'语文':91,'数学':89,'英语':85}
stu2 = {'语文':89,'数学':100,'英语':80}
stu3 = {'语文':100,'数学':90,'英语':95}
score = {'悟空':stu1,'诺依':stu2,'小贝':stu3}
while True:
s=input('请输入您的名字(如需退出请输入"退出"):')
if s in score:
info=score[s];
print('*'*30)
for k,v in info.items():
print(k,v)
#print(score[s])
print('*'*30)
elif s not in score:
print('*'*30)
print('此人不存在')
print('*'*30)
elif s == '退出':
break
\ 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