简答题
偏难
#4661
有十位选手参加某项比赛,共有10位评委参与评分。每位选手得分已保存在“score1.txt”文件中,如图所示。第一行表示1号选手的所有得分,第二行表示2号选手的…

答案与解析
正确答案:<pre class="brush:python;toolbar:false"># 样例代码
with open("/data/score1.txt", encoding="UTF-8") as f:
data = f.readline().strip()
i = 0
m = 0
while data:
i+=1
score = list(map(float, data.split()))
result = (sum(score) - min(score) - max(score)) / (len(score) - 2)
if result>m :
m = result
pos = i
data =f.readline().strip()
print("成绩最佳的选手是:" +str(pos)+ "号,得分:" + str(m) + "分"</pre>
这道题暂未补解析。