Project: Find the median

Write a function named find_median that takes a list of numbers and returns their median. You will need to sort the list first. If you are not sure how the median works, look it up before you start.

list_of_nums = [13, 7, -3, 82, 4]
result = find_median(list_of_nums)

Save the file as find_median.py.

Show a solution

Try the project on your own first. This is one working solution, followed by its tests. Press Run to run the tests. Read them to see what thorough testing looks like, then change the solution and run again to watch a test fail. The testing tools used here (classes and unittest) are not part of the course yet, so do not worry about how they work.

Projects run on your own computer, so you tell us when you are done.