Iam trying to code this
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)
Contents of results.txt
:
Johnny 8.65
Juan 9.12
Joseph 8.45
Stacey 7.81
Aideen 8.05
Zack 7.21
Aaron 8.31
Iam Actually reading Head first to python Book And I Got This Code Example But It is'nt Working For me i Dont Know What My Mistake Is Can Someone Please Figure This Out Iam Using Python3.6