Rounding the mean only — why not min and max?

BellaRossiOP

Stage 2 says round the mean to one decimal.

4

Comments 4

Log in to join the discussion.

Log in Create account
  1. CharlieHreplies: 2

    Min and max are actual readings, already with their real precision. The mean is computed and can have a long float tail, so rounding it makes the dict clean for every consumer (dashboard, report, alerts).

    5
    1. BellaRossiOPreplies: 1

      Makes sense, min/max are real values.

      1
      1. SophieDev

        And the empty case with None values keeps the same shape. Consumers don't need special handling for missing keys.

        4
    2. AmeliaRuns

      Returning a dict means callers pick what they need. Much better than printing four lines inside.

      5