CBSE Class 11 Computer Science Question 29 of 63

Introduction to Python Modules — Question 10

Back to all questions
10
Question

Question 10

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
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.