Question: Python problem2 Argument: This function takes a python list as an argument Task For a given list, find the median. The median is the 50th
Python problem2
Argument: This function takes a python list as an argument
Task
For a given list, find the median. The median is the 50th percentile. Steps to find the median:
1. sort the list
2. find if the length of the list is even or odd
3. if the length of the list (len(mylist)) is odd, then the median is in the (n+1)/2 index
4. If the length of the list (len(mylist)) is even, then the median is the average of the elements in the n/2 and (n/2)+1 positions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
