Computer Science

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.

Python Modules

2 Likes

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.

Answered By

2 Likes


Related Questions