You are given a Triple <String, Int, List<Double>> that represents the name of a student, the course number, and the marks received. Write a function named resume that receives this Triple and returns a new Pair as a resume with the student's name and the average of the marks.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming usage
Pair and Triple
Resume with marks
Report a typo
Sample Input 1:
(Anne, 2, [8.0, 7.0, 9.0])Sample Output 1:
(Anne, 8.0)Write a program in Kotlin
fun resume(marks: Triple<String, Int, List<Double>>): Pair<String, Double> {
// 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.