Rounding the mean only — why not min and max? BEBellaRossiOP 23 Sep, 12:16 Stage 2 says round the mean to one decimal.
CHCharlieH23 Sep, 19:30replies: 2Min 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).
SOSophieDev24 Sep, 08:19And the empty case with None values keeps the same shape. Consumers don't need special handling for missing keys.
AMAmeliaRuns23 Sep, 23:27Returning a dict means callers pick what they need. Much better than printing four lines inside.
Comments 4
Join the discussion CommentAlready have an account? Log in
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).
Makes sense, min/max are real values.
And the empty case with None values keeps the same shape. Consumers don't need special handling for missing keys.
Returning a dict means callers pick what they need. Much better than printing four lines inside.