My output, especially the average height calculation matches the example.