Median


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/5?curriculum_id=4f89dab3d788890003000096#


possible bug?


the average of [4,5,5,5] should be 5.0 and not 4.5. It throws an error and says 4.5 should be the median


Replace this line with your code.


#2

agree, the median of [4,5,5,5] is 5, but the median of [4,5,5,4] should be 4.5 (those lists are not the same)

the median is the middle value (or average of middle two lists) of a sorted list


#3

okay. got it. I missed that it should be a sorted list. Thank you so much :slight_smile:


#4

well, you sorted the list, but then never used it. Good you figured it out :slight_smile:


#5