CBSE Class 11 Computer Science Question 5 of 63

Introduction to Python Modules — Question 5

Back to all questions
5
Question

Question 5

Assertion (A): The median() method returns the middle value of numeric data in a list.

Reasoning (R): The math module contains both mathematical and statistical functions.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

A is true but R is false.

Explanation
The median() function returns the middle value of numeric data in a list. This function finds the centre value, and if the data set has an even number of values, it averages the two middle items. The math module contains mathematical functions. The statistics module contains statistical functions.