【单选题】已知字典 dic={"小红":{"语文":90,"数学":85,"外语":85},"小明":{"语文":91,"数学":88,"外语":98},"小玲":{"语文":95,"数学":99,"外语":90}} ,则以下能输出外语最高分的学生姓名的有:
A.
lst=[v["外语"] for k,v in dic.items()] print(max(lst))
B.
lst=[(k,v["外语"]) for k,v in dic.items()] print(max(lst))
C.
lst=[(v["外语"],k) for k,v in dic.items()] print(max(lst))
D.
maxscore=0 for k,v in dic.items(): if v["外语"]>=maxscore: maxname=k maxscore=v["外语"] print(maxname)
【单选题】试片箱中步距递量递增梯度为土0.25D的正负圆柱透镜试片的范围是( )。
【多选题】已知字典dic={"小红":{"语文":90,"数学":85,"外语":85},"小明":{"语文":91,"数学":88,"外语":98},"小玲":{"语文":95,"数学":99,"外语":90}},则以下能计算语文平均分的程序有:
A.
lst=[v["语文"] for k,v in dic.items()] print(sum(lst)/len(lst))
B.
s=0 for k,v in dic: s=s+v["语文"] print(s/len(dic))
C.
s=0 for k,v in dic.items(): s=s+v print(s/len(dic))
D.
s=0 for x in dic.items(): s=s+x[1]["语文"] print(s/len(dic))