✍️ Get Writing Help
Uncategorized

Mean, Median and Mode

Given a list of integers, write a program to print the mean, median and mode.

Mean – The average value of all the numbers.

Median – The mid-point value in the sorted list.

Mode – The most common value in the list.

 

If multiple elements with same frequency are present, print all the values with same frequency in increasing order. Input

The input will be a single line containing space-separated integers. Output

The first line of output should contain the mean, round off the value to 2 decimal places.

The second line of output should contain the median, round off the value to 2 decimal places.

The third line of output should contain the mode.

Mean should always be a float value.

Median should be a float value when there are even number of elements, otherwise should be an integer value.

 

Expert academic writer and education specialist helping students in the UK, USA, and Australia achieve their best results.

Need help with your own assignment?

Our expert writers can help you apply everything you've just read — to your actual assignment.

Get Expert Help Now →
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?