Identify the correct output produced by the Python program from the options…
2026
Identify the correct output produced by the Python program from the options given below:
import statistics
Data = [3, 2, 4, 2, 9]
M1 = statistics.mean(Data)
M2 = statistics.median(Data)
M3 = statistics.mode(Data)
print(M1, M2, M3)
- A.
432
- B.
333
- C.
423
- D.
422
Attempted by 328 students.
Show answer & explanation
Correct answer: A
Data = [3, 2, 4, 2, 9]
Mean (M1) = (3 + 2 + 4 + 2 + 9) / 5 = 20 / 5 = 4.0
Median (M2) → sorted data = [2, 2, 3, 4, 9] → middle value = 3
Mode (M3) → most frequent value = 2
print(M1, M2, M3) outputs:
4.0 3 2
So the correct option is 432 (values correspond to 4, 3, 2).