Implement the following functions in a Scala worksheet:
An instructor maintains a list of lists of exam scores:
var cs152 = List(List(93, 89, 90), List(75, 76, 68), List(88,82, 78))
The first list represents the scores of student 1, the secondstudent 2, etc.
Write the following functions for processing lists of thisform:
def avg(scores: List[Double]): Double = avg of scores
def avgAvg(scores: List[List[Double]]): List[Double] =
list of averages for each student
def passing(scores: List[List[Double]]): List[Int] =
list of positions in the list with avg >= 70
def sumSums(scores: List[List[Double]]):Double = sum of sums ofall scores
Expert Answer
An answer will be send to you shortly. . . . .