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

 

orion.a.smith@gmail.com apcsa-lists > findAverage
prev  |  next  |  chance

The method findAverage() takes an arraylist of doubles and returns the average after the high and low scores are removed.
Preconditions:
The list will be at least 3 numbers long.
There will never be a tie for highest or lowest.


findAverage([100.0, 30.5, 50.5, 99.0, 77.0, 45.5]) → 68.0
findAverage([67.5, 36.5, 69.5, 88.0, 99.5, 76.5, 82.5]) → 76.8
findAverage([55.0, 66.0, 77.0, 88.0, 99.0, 44.0, 55.0]) → 68.2

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

public double findAverage(ArrayList<Double> lst){ }

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

Java Help

Misc Code Practice

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy