Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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 Excel

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions