我正试着给它编码
highest_score = 0
result_f = open('results.txt')
for line in result_f:
(name, score) = line.split()
if float(score) > highest_score:
highest_score = float(score)
result_f.close()
print("the Highest score was: ")
print(highest_score)
results.txt
的内容:
我实际上是在读python的书 我得到了这个代码示例,但它对我不起作用 我不知道我的错误是什么,有人能帮我用Python3.6弄明白吗
目前没有回答
相关问题 更多 >
编程相关推荐