there are 2 sections a and b in a class , consisting of 50 and 70 students respectively . if the average weight of section a is 50 kg and that of section b is 70 kg , find the average of the whole class ?
n0 = 2.0
n1 = 50.0
n2 = 70.0
n3 = 50.0
n4 = 70.0
t0 = n1 + n2
t1 = n1 * n3
t2 = n2 * n4
t3 = t1 + t2
answer = t3 / t0
print(answer)