We have a list of scores from your Kotlin tests. Please obtain the average of your scores.
Aggregate operations on collections
The average of your scores
Report a typo
Sample Input 1:
10.0 9.5 8.0 7.5 6.0 5.5Sample Output 1:
7.75Write a program in Kotlin
fun main() {
val list = readln().split(" ").map { it.toDouble() }
// write your code here
val res =
println(res)
}
___
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.