Which of the following statements is false?

a. The descriptive statistics mean, median and mode are measures of central tendency—each is a way of producing a single value that is in some sense typical of the others.
b. The following session creates a list called grades, then uses the built-in sum and len functions to calculate the median “by hand”—sum calculates the total of the grades (397) and len returns the number of grades (5):

In [1]: grades = [85, 93, 45, 89, 85]

In [2]: sum(grades) / len(grades)
Out[2]: 79.4

c. Like functions min and max, sum and len are both examples of functional-style programming reductions—they reduce a collection of values to a single value.
d. The Python Standard Library’s statistics module provides functions for calcu-lating the mean, median and mode—these, too, are reductions.

b. The following session creates a list called grades, then uses the built-in sum and len functions to calculate the median “by hand”—sum calculates the total of the grades (397) and len returns the number of grades (5):

In [1]: grades = [85, 93, 45, 89, 85]

In [2]: sum(grades) / len(grades)
Out[2]: 79.4

Computer Science & Information Technology

You might also like to view...

The symbol on the Enter button is a(n) ________

A) right arrow B) left arrow C) x D) checkmark

Computer Science & Information Technology

___________ enables new classes to absorb the data and behaviors of existing classes and embellish these classes with new capabilities.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology