/**
 * This function takes a nurse's name and a list of patient names as inputs.
 * It creates a tuple containing the nurse's name and the number of patients.
 * The function then combines a for loop with other functions to perform a task.
 */
fun tupleAndLoop(nurseName: String, patientsList: List<String>): List<Pair<String, Int>> {

    // Creating a tuple with nurse's name and number of patients
    val nurseTuple = Pair(nurseName, patientsList.size)

    // Initializing a list to hold the result
    val result = mutableListOf<Pair<String, Int>>()

    // Combining for loop with other functions
    for (patientName in patientsList) {
        val capitalizedName = patientName.capitalize()
        val nameLength = capitalizedName.length
        result.add(Pair(capitalizedName, nameLength))
    }

    return result
}

// Example usage
/**
 * This function takes a nurse's name and a list of patient names as inputs.
 * It creates a tuple containing the nurse's name and the number of patients.
 * The function then combines a for loop with other functions to perform a task.
 */
fun tupleAndLoop(nurseName: String, patientsList: List<String>): List<Pair<String, Int>> {
/**
 * This function takes a nurse's name and a list of patient names as inputs.
 * It creates a tuple containing the nurse's name and the number of patients.
 * The function then combines a for loop with other functions to perform a task.
 */
fun tupleAndLoop(nurseName: String, patientsList: List<String>): List<Pair<String, Int>> {

    // Creating a tuple with nurse's name and number of patients
    val nurseTuple = Pair(nurseName, patientsList.size)

    // Initializing a list to hold the result
    val result = mutableListOf<Pair<String, Int>>()

    // Combining for loop with other functions
    for (patientName in patientsList) {
        val capitalizedName = patientName.capitalize()
        val nameLength = capitalizedName.length
        result.add(Pair(capitalizedName, nameLength))
    }

    return result
}

// Example usage