/**
 * This function takes a list of temperature values recorded at different locations and calculates the average temperature.
 *
 * @param data a list of pairs, where each pair contains the location (String) and the recorded temperature (Double)
 * @return the average temperature of all the recorded values
 */
fun calculateAverageTemperature(data: List<Pair<String, Double>>): Double {

    var totalTemperature = 0.0
    var totalLocations = 0

    for ((_, temperature) in data) {
        totalTemperature += temperature
        totalLocations++
    }

    return totalTemperature / totalLocations
}
/**
 * This function takes a list of temperature values recorded at different locations and calculates the average temperature.
 *
 * @param data a list of pairs, where each pair contains the location (String) and the recorded temperature (Double)
 * @return the average temperature of all the recorded values
 */
fun calculateAverageTemperature(data: List<Pair<String, Double>>): Double {
/**
 * This function takes a list of temperature values recorded at different locations and calculates the average temperature.
 *
 * @param data a list of pairs, where each pair contains the location (String) and the recorded temperature (Double)
 * @return the average temperature of all the recorded values
 */
fun calculateAverageTemperature(data: List<Pair<String, Double>>): Double {

    var totalTemperature = 0.0
    var totalLocations = 0

    for ((_, temperature) in data) {
        totalTemperature += temperature
        totalLocations++
    }

    return totalTemperature / totalLocations
}