Hackerrank Python Average Learning