Question: Define a function named find _ median that takes as a parameter a list of numbers. The function should return the statistical median of those

Define a function named find_median that takes as a parameter a list of numbers. The function should return the statistical median of those numbers, which will require it to sort the list. If you're not familiar with calculating the median, please see the definition of the statistical median here. Remember that the calculation is different for odd and even groups of values. Two lists containing the same numbers should always have the same median, regardless of the order of the numbers in each list.
If the list passed to find_median is empty, then find_median should return None.
For example, it could be used like this:
values =[13,7,-3,82,4]
result = find_median(values) # result is 7
Please name your program file find_median.py.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!