/**
 * Given a dictionary representing an athlete where each key is the name of a sport and the value is a list
 * of scores, calculate the average score for each sport and return a nested dictionary where each key is
 * the name of a sport and the value is the average score for that sport.
 */
fun calculateAverageScores(athlete: Map<String, List<Double>>): Map<String, Double> {

    val averageScores = mutableMapOf<String, Double>()

    // Iterate over each sport in the athlete dictionary
    for ((sport, scores) in athlete) {
        // Calculate the average score for the current sport
        val averageScore = scores.sum() / scores.size.toDouble()

        // Add the average score to the nested dictionary
        averageScores[sport] = averageScore
    }

    return averageScores
}
/**
 * Given a dictionary representing an athlete where each key is the name of a sport and the value is a list
 * of scores, calculate the average score for each sport and return a nested dictionary where each key is
 * the name of a sport and the value is the average score for that sport.
 */
fun calculateAverageScores(athlete: Map<String, List<Double>>): Map<String, Double> {
/**
 * Given a dictionary representing an athlete where each key is the name of a sport and the value is a list
 * of scores, calculate the average score for each sport and return a nested dictionary where each key is
 * the name of a sport and the value is the average score for that sport.
 */
fun calculateAverageScores(athlete: Map<String, List<Double>>): Map<String, Double> {

    val averageScores = mutableMapOf<String, Double>()

    // Iterate over each sport in the athlete dictionary
    for ((sport, scores) in athlete) {
        // Calculate the average score for the current sport
        val averageScore = scores.sum() / scores.size.toDouble()

        // Add the average score to the nested dictionary
        averageScores[sport] = averageScore
    }

    return averageScores
}