Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math, physic, russian = 0, 0, 0 ; counter = 0 ; output = open('output.txt', 'w')
- with open('dataset_3363_4.txt') as text:
- for lines in text:
- middle = text.readline().strip().split(';')
- a, b, c = int(middle[1]), int(middle[2]), int(middle[3])
- print(( a + b + c)/3, middle, file = output)
- counter += 1
- math += a ; physic += b ; russian += c
- print((math/counter), (physic/counter), (russian/counter), file = output)
- output.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement