### Instruction: there are 2 sections a and b in a class , consisting of 40 and 30 students respectively . if the average weight of section a is 50 kg and that of section b is 60 kg , find the average of the whole class ? Please write a program to solve it.### Response: n0 = 2.0
n1 = 40.0
n2 = 30.0
n3 = 50.0
n4 = 60.0
t0 = n1 + n2
t1 = n1 * n3
t2 = n2 * n4
t3 = t1 + t2
answer = t3 / t0
print(answer)