A group took a trip on a bus, at 3 per child and 3.20 per adult for a total of 118.40.
They took the train back at 3.50 per child and 3.60 per adult for a total of 135.20.
How many children, and how many adults?
import numpy as np a = np.matrix('3. 3.2;3.5,3.6') b = np.matrix('118.4;135.2') inverse_a = np.linalg.inv(a) print(inverse_a) result = inverse_a * b print(result)