Question: This question is for python 3 I have a question that wants me to have a file that has three columns of numbers with 100
This question is for python 3
I have a question that wants me to have a file that has three columns of numbers with 100 rows (it could be more than 100, but it has to be at least 100)
The idea is that I need to find the mean, median, minimum, maximum, and range of each column. That means I'd have three means, three medians, etc. for each individual column of numbers. I've managed to figure out how to find everything except for the median, which needs to be found using calculations, NOT with any library or built-in function. The code I put below shows that I've managed to sort a column from least to greatest, however, I do not know how to solve for the median while in this organized form.
( I also put an example of what the file looks like)


file = open( "myFileo.csv", "r") reader = csv. reader(file) height = [] weight = [] experience = [] for line in reader: height.append(int(line [0])) weight.append(int(line[1])) experience.append(int(line [2])) print("Height") Mean = sum (height) / len(height) for i in range(len(height)): for j in range(i + 1 , len(height)): if height[i] > height[j]: height[i], height [j] = height[i], height[j] print(height) Median = 100,3,3 101,4,4 102,5,5 103,6,6 104,7,7 105,8,8 106,9,9 107, 10,10 108,11,11 109, 12, 12 110,13,13 111,14,14 112, 15, 15 113, 16, 16 114, 17, 17 115, 18, 18 116, 19, 19 117,20,20 118,21,21 119,22,22 120,23,23 121,24,24 122,25,25 123, 26, 26 124,27,27 125,28,28 126,29,29 127,30,30 128,31,31 129,32,32
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
