poprawki do obliczania metryk 21

This commit is contained in:
alicja.m.musial 2020-04-03 17:16:33 +02:00
parent a4c9d9b2f5
commit 0ba06877b9

View File

@ -4,7 +4,8 @@ if __name__ == '__main__':
sum = 0
lineCount = 0
with open('wer.txt','a+') as werOut:
with open('wer.txt','r+') as werOut, \
open('werFinish.txt','w+') as werF:
for line in werOut:
num = float(line)
sum += num
@ -12,4 +13,4 @@ if __name__ == '__main__':
werAv = 0
werAv = sum / lineCount
werOut.write(f'{werAv:.5f}\n')
werF.write(f'{werAv:.5f}\n')