/**
 * Given a list of names and their respective grades, this function displays the students who have
 * scored above average.
 *
 * @param names A list of names of the students
 * @param grades A list of grades corresponding to each student
 * @return A list of names of the students who scored above average
 */
fun describeStudentsGrades(names: List<String>, grades: List<Int>): List<String> {

    val totalGrades = grades.sum()
    val averageGrade = totalGrades / grades.size

    val aboveAverageStudents = mutableListOf<String>()
    for ((index, grade) in grades.withIndex()) {
        if (grade > averageGrade) {
            aboveAverageStudents.add(names[index])
        }
    }

    return aboveAverageStudents
}
/**
 * Given a list of names and their respective grades, this function displays the students who have
 * scored above average.
 *
 * @param names A list of names of the students
 * @param grades A list of grades corresponding to each student
 * @return A list of names of the students who scored above average
 */
fun describeStudentsGrades(names: List<String>, grades: List<Int>): List<String> {
/**
 * Given a list of names and their respective grades, this function displays the students who have
 * scored above average.
 *
 * @param names A list of names of the students
 * @param grades A list of grades corresponding to each student
 * @return A list of names of the students who scored above average
 */
fun describeStudentsGrades(names: List<String>, grades: List<Int>): List<String> {

    val totalGrades = grades.sum()
    val averageGrade = totalGrades / grades.size

    val aboveAverageStudents = mutableListOf<String>()
    for ((index, grade) in grades.withIndex()) {
        if (grade > averageGrade) {
            aboveAverageStudents.add(names[index])
        }
    }

    return aboveAverageStudents
}