KnowledgeBoat Logo
|

Computer Science

What will the following code display on execution?

X = statistics.mean([2, 15, 6, 19])

  1. 10.5
  2. 10.6
  3. Error
  4. None of these

Python Modules

1 Like

Answer

10.5

Reason — The statistics.mean() function calculates the arithmetic mean of the numbers in the list. For the list [2, 15, 6, 19], the mean is computed as (2 + 15 + 6 + 19)/4 = 42/4 = 10.5.

Answered By

3 Likes


Related Questions