/**
 * This function takes in a list of patients and calculates the average age of the nurse's patients.
 *
 * @param patients A list of pairs, each containing the name and age of a patient.
 * @return The average age of the nurse's patients.
 */
fun countAverageAge(patients: List<Pair<String, Int>>): Double {

    var totalAge = 0
    var count = 0

    for (patient in patients) {
        totalAge += patient.second
        count++
    }

    val averageAge = totalAge.toDouble() / count

    return averageAge
}
/**
 * This function takes in a list of patients and calculates the average age of the nurse's patients.
 *
 * @param patients A list of pairs, each containing the name and age of a patient.
 * @return The average age of the nurse's patients.
 */
fun countAverageAge(patients: List<Pair<String, Int>>): Double {
/**
 * This function takes in a list of patients and calculates the average age of the nurse's patients.
 *
 * @param patients A list of pairs, each containing the name and age of a patient.
 * @return The average age of the nurse's patients.
 */
fun countAverageAge(patients: List<Pair<String, Int>>): Double {

    var totalAge = 0
    var count = 0

    for (patient in patients) {
        totalAge += patient.second
        count++
    }

    val averageAge = totalAge.toDouble() / count

    return averageAge
}