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

 

konstans@stuy.edu > processScores
prev  |  next  |  chance

Remove the lowest and highest scores from the list, then append the average of the remaining scores. All lists have at least 3 elements.
Finally return the list (because codingbat checks returned values)
Note: Python 2 has different division rules. Please divide by a floating point to get decimal results e.g. divide by: (1.0*NUMBER_YOU_WANT_TO_DIVIDE_BY)


processScores([89, 90, 71, 93, 94]) → [89, 90, 93, 90.66666666666667]
processScores([80, 96, 75, 93, 88]) → [80, 93, 88, 87.0]
processScores([77, 85, 93, 91, 93]) → [85, 91, 93, 89.66666666666667]

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

def processScores(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

Copyright Nick Parlante 2017 - privacy