ZS Associates Interview Question

Write a function to calculate mse and mae.