평균값 구하기

bool betterThanAverage(List<int> classPoints, int yourPoints) {
// your code here
int sum = 0;
for (var i = 0; i < classPoints.length; i++) {
sum += classPoints[i];
}
int avg = (sum / classPoints.length).toInt();

return avg < yourPoints;

}
bool betterThanAverage(List<int> classPoints, int yourPoints) => (classPoints.reduce((a, b) => a + b) / classPoints.length) < yourPoints;
bool betterThanAverage(List<int> classPoints, int yourPoints) {
  double average = classPoints.fold(0, (prev, element) => element+prev) / classPoints.length;
  return yourPoints > average;
}