Q. Consider the code given below:

 

import statistics as st

v = [7, 8, 8, 11, 7, 7]

m1 = st.mean(v)

m2 = st.mode(v)

m3 = st.median(v)

print(m1, m2, m3)

 

Which of the following is the correct output of the above code?

 

(a) 7 8 7.5

(b) 8 7 7

(c) 8 7 7.5

(d) 8.5 7 7.5

 

Answer =

 

Option (c) is correct.

5 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. I am not able to understand this answer.... please explain clearly

    ReplyDelete
    Replies
    1. First calculate mean:-
      (7 +7 +7+8+8+11)/6 = 8

      Then median that is (7+8) /2 = 7.5

      Then mode is highest value repeated that is 7

      :)

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post