List of students' grades

Report a typo

Taking a collection of qualifications as a List, obtain the average grade of the students who have passed the exam.

You must overload the invoke to function with markLimit to obtain the average of all the grades that are greater than this limit.

val listOfGrades = listOf(5.5, 4.6, 3.0, 2.5, 10.0, 9.9, 8.75)
println(listOfGrades(5.0))

Sample Input 1:

5.5 4.6 3.0 2.5 10.0 9.9 8.75

Sample Output 1:

8.5375
Write a program in Kotlin
// define the function
/*?*/(markLimit: Double): Double {
// and write your code here
}
___

Create a free account to access the full topic