id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

tmhscs@gmail.com python > list_median
prev  |  next  |  chance

Given a list of integers, sort the list and then return the middle element.


list_median([1, 2, 3, 4, 5]) → 3
list_median([2, 1, 5, 4, 3]) → 3
list_median([3, 4, 5]) → 4

...Save, Compile, Run (ctrl-enter)

def list_median(data):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Post-solution available

Copyright Nick Parlante 2017 - privacy