Search Results

Search found 1 results on 1 pages for 'user3450574'.

Page 1/1 | 1 

  • python how to find the median of a list

    - by user3450574
    I'm trying to write a function named median that takes a list as an input and returns the median value of the list. I'm working with Python 2.7.2 The list can be of any size and the numbers are not guaranteed to be in any particular order. If the list contains an even number of elements, the function should return the average of the middle two. This is the code I'm starting with: def median(list): print(median([7,12,3,1,6,9]))

    Read the article

1