Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using python code: Program 3: (Median, Sorting and Reversing Lists) The median of a data set is the middle value of the data set. However,
Using python code:
Program 3: (Median, Sorting and Reversing Lists) The median of a data set is the "middle value" of the data set. However, the method for determining the median depends on whether there are an odd number of data points or an even number of data points. For an odd number of data points, sort the data by value and chose the "middle value." For the example shown below, the median value is 5. Given [3 4 9 577 5 2855319 2] Order [1 22 334 55 55 77 8 9 9] 11234561010 11 12 13 14 15) For an even number of data points, sort the data by value and average the two "middle values." For the example shown below, the median is 4.5. Given Order [3 49477 528 531 9 2] [1 2 2 3 3 4 4 5 5 7 7 8 9 9] [1 2 3 4 5 6 7 8 9 10 11 12 13 14] Please put the code for the following Program 3 exercises in the same file (Lab6b_Prog3.py). Please separate code for each part with appropriate comments. Part A. Develop code to find and display the median of a list of numerical data. Develop your code for a list of arbitrary length. This includes lengths that are odd or even. Sort the list. 0 You may use Python's built-in list sorting method. Determine the median based on the definition above. o Use a loop to find the values you need in the sorted list. Test your routine using the grade data from Lab6Act2. o Check with ExcelStep 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