Commit 97e1b9cf by BellCodeEditor

save project

parent 1f2fea95
Showing with 12 additions and 8 deletions
...@@ -8,13 +8,17 @@ xuesheng1 = {'语文':10,'数学':20,'英语':30} ...@@ -8,13 +8,17 @@ xuesheng1 = {'语文':10,'数学':20,'英语':30}
xuesheng2 = {'语文':11,'数学':21,'英语':31} xuesheng2 = {'语文':11,'数学':21,'英语':31}
xuesheng3 = {'语文':12,'数学':22,'英语':32} xuesheng3 = {'语文':12,'数学':22,'英语':32}
score = {'悟空':xuesheng1,'小依':xuesheng2,'小贝':xuesheng3} score = {'悟空':xuesheng1,'小依':xuesheng2,'小贝':xuesheng3}
name = input('名字:') while True:
print('*'*30) print('若想退出就按q')
if name in score: name = input('名字:')
score = score[name]
for k,v in score.items():
print(k,v)
print('*'*30) print('*'*30)
else: if name in score:
print('错误') score = score[name]
for k,v in score.items():
print(k,v)
print('*'*30)
elif name == 'q':
break
else:
print('错误')
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