/**
 * This function takes a dictionary of students' scores and returns the average score for each student.
 *
 * @param scores A dictionary with student names as keys and a list of scores as values.
 * @return A dictionary with student names as keys and their average scores as values.
 */
fun calculateAverageScores(scores: Map<String, List<Int>>): Map<String, Double> {

    val averageScores = mutableMapOf<String, Double>()

    for ((student, scoreList) in scores) {
        var totalScore = 0
        var count = 0
        for (score in scoreList) {
            totalScore += score
            count++
        }
        val averageScore = totalScore.toDouble() / count
        averageScores[student] = averageScore
    }

    return averageScores
}
/**
 * This function takes a dictionary of students' scores and returns the average score for each student.
 *
 * @param scores A dictionary with student names as keys and a list of scores as values.
 * @return A dictionary with student names as keys and their average scores as values.
 */
fun calculateAverageScores(scores: Map<String, List<Int>>): Map<String, Double> {
/**
 * This function takes a dictionary of students' scores and returns the average score for each student.
 *
 * @param scores A dictionary with student names as keys and a list of scores as values.
 * @return A dictionary with student names as keys and their average scores as values.
 */
fun calculateAverageScores(scores: Map<String, List<Int>>): Map<String, Double> {

    val averageScores = mutableMapOf<String, Double>()

    for ((student, scoreList) in scores) {
        var totalScore = 0
        var count = 0
        for (score in scoreList) {
            totalScore += score
            count++
        }
        val averageScore = totalScore.toDouble() / count
        averageScores[student] = averageScore
    }

    return averageScores
}