#12-1:下列代码实现读取数据、计算总分、存入zflst列表的功能
#读入数据存入列表data中,这里已简化,直接给出列表
data=[["Misserina","44","44"],["Shentx","47","41.5"],["panpan","47.5","46"],["mekdull","45.5","41"],["fangjianru","49","50"],
["NASFsky","50","30.5"],["Gch738","50","47"],["A_Cabbage","48.5","48.5"],["ZhangXiang","50","46.5"],["baoyuchen","44","44.5"],
["fuyue1997","42.5","40"],["aespa","31","38.5"],["qiuuu","50","44.5"],["yintaocheng","49","47.5"],["wenyitian","1.5","2"],
["chengnuo","48.5","48.5"],["zhouqixiang","38.5","50"],["(G)I-DLE","12.5","17"],["wangshengzhi","42.5","44.5"]]
zflst=[]
for stu in data:
zf=__________
zflst.append(zf) #把zf添加到zflst列表中
#12-2:选出总分最高的前十名(第十名若有同分一起输出)。
#基本思路为:逐个比较最大值,从zflst中挑选出总分最高的前十名,然后再遍历整个zflst查找第10名的同分。
#为了避免重复参与选择,创建flag列表为每个分数标记:False代表未被选出,True代表已被选出。
print("姓名 总分")
n=__________
flag=[False]*n #创建一个flag列表,含有n个False元素
for i in range(10): #选出最高的10个总分
mx=0
for j in range(n):
if flag[j]==False:
if __________:
mx=zflst[j]
k=j
print(data[k][0]," ",zflst[k])
flag[k]=True
i=0
while i<n: #查找同分
if __________:
print(data[i][0]," ",zflst[i])
flag[i]=True
i+=1