Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 findmedian 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 findmedian is empty, then findmedian should return None.
For example, it could be used like this:
values
result findmedianvalues # result is
Please name your program file findmedian.py
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started