QuestionQ24

VerifiedWorking with Data and Performing Simple Analyses

Given the following list of daily step counts:

steps = [8230, 9020, 7640, 8760, 10020, 2546, 9817]  

Calculate:

  • the standard deviation of the step counts,
  • the average, rounded up to the nearest whole number, and
  • the median of the step counts.

Which code snippet correctly completes all three tasks? Select the best answer.

Explanation

statistics.stdev() returns the sample standard deviation, statistics.mean() returns the arithmetic mean, and statistics.median() returns the middle value. Applying math.ceil() to the mean rounds it upward to the smallest whole number that is at least the mean.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!