Commit da8850b3 by BellCodeEditor

save project

parent 3184b710
Showing with 10 additions and 6 deletions
score = {'语文':91,'数学':88,'英语':85} student1 = {'语文':91,'数学':88,'英语':85}
for y,v in score.items(): student2= {'语文':1,'数学':8,'英语':5}
print(y,v) student3= {'语文':9,'数学':8,'英语':8}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 score={'王一安':student1,'坤坤':student2,'草子博':student3}
name=input("请问你的名字是:")
if name in score:
print ("-"*30)
for k,v in score[name].items():
print(k,v)
print ("-"*30)
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