Taking a collection of qualifications as a sequence, obtain the average grade of the students who have passed the exam. Remember that an exam has been passed if your grade is greater than 5.
Sequences
List of students' grades
Report a typo
Sample Input 1:
5.5 4.6 3.0 2.5 10.0 9.9 8.75Sample Output 1:
8.5375Write a program in Kotlin
fun main() {
val listOfGrades = readln().split(" ").map { it.toDouble() }.asSequence()
// write your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.