test_results = [
[85.4, 71.6, 93.2, 65.8, 45.0],
[89.5, 80.0, 95.5, 76.5, 72.0]
]
def calculate_average(results):
return sum(results) / len(results)
for i, results in enumerate(test_results):
average = calculate_average(results)
print(f'Средний результат {"«до»" if i == 0 else "«после»"}: {average:.2f}')
test_results = [
[85.4, 71.6, 93.2, 65.8, 45.0]
[89.5, 80.0, 95.5, 76.5, 72.0]
]
average = 72.2
for result in test_results[]:
average += result
print('Средний результат «до»:', average/test_results[0])
average = 0
for result in test_results[]:
average += result
print('Средний результат «после»:', average/test_results[1])