15. median. (SOLVED) Please Help, don't know where to start (SOLVED)


#1



15.median


I'm stuck on question 15 as I dont even know where to start. Please you you give me some hints?


def median(lst):


#2

How would you find the median by hand?


#3

No, I want to do it in code!


#4

Coding is giving the computer instructions. How are you going to do that if you don't know how to find the median yourself?
Just list out a step by step process on how to find the median. Then translate that into code.


#5

Ummm.... okay, I know how to find the median by hand, just not in code.


#6

Ok, so what's the first step to finding the median?


#7

done:
import numpy
def median(lst):
return numpy.median(numpy.array(lst))


#8

Hmm yes using a module is helpful. Out of scope considering the lessons but good job.


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.