Question: Write a function called median which takes a list of numbers x and returns the median value (see Wikipedia:Median). If the length of the list

Write a function called median which takes a list of numbers x and returns the median value (see Wikipedia:Median). If the length of the list x is odd then the median is the middle value and if the length is even then the median is the average of the two middle values. For example, the median of [1,3,1,6,2] is 2 and the median of [1,3,2,6,1,0] is 1.5. Use the built-in function to sort the list of values. Use the modulo operator % to determine if an integer is odd or even. This is an exercise in pure Python. Do not use any Python packages such as or or for this exercise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
