Hackerrank Python Average Method In Forecasting