/**
 * Given a nurse's data as a tuple, modify the gender field of the nurse's record
 * and return the updated nurse's data.
 *
 * @param nurseData A tuple containing the nurse's data in the format (name, age, gender, experience)
 * @param updatedGender The new gender value for the nurse
 * @return The updated nurse's data with the modified gender field
 *
 * Example:
 * nurseData = listOf("Alice", 35, "Female", 10)
 * val updatedData = modifyNurseData(nurseData, "Male")
 * println(updatedData) // Output: ["Alice", 35, "Male", 10]
 */
fun modifyNurseData(nurseData: List<Any>, updatedGender: String): List<Any> {

    // Extract individual fields from the nurseData list
    val name = nurseData[0]
    val age = nurseData[1]
    val gender = nurseData[2]
    val experience = nurseData[3]

    // Modify the gender field to the updated gender value
    val modifiedData = nurseData.toMutableList()
    modifiedData[2] = updatedGender

    // Return the updated nurse's data as a list
    return modifiedData
}
/**
 * Given a nurse's data as a tuple, modify the gender field of the nurse's record
 * and return the updated nurse's data.
 *
 * @param nurseData A tuple containing the nurse's data in the format (name, age, gender, experience)
 * @param updatedGender The new gender value for the nurse
 * @return The updated nurse's data with the modified gender field
 *
 * Example:
 * nurseData = listOf("Alice", 35, "Female", 10)
 * val updatedData = modifyNurseData(nurseData, "Male")
 * println(updatedData) // Output: ["Alice", 35, "Male", 10]
 */
fun modifyNurseData(nurseData: List<Any>, updatedGender: String): List<Any> {
/**
 * Given a nurse's data as a tuple, modify the gender field of the nurse's record
 * and return the updated nurse's data.
 *
 * @param nurseData A tuple containing the nurse's data in the format (name, age, gender, experience)
 * @param updatedGender The new gender value for the nurse
 * @return The updated nurse's data with the modified gender field
 *
 * Example:
 * nurseData = listOf("Alice", 35, "Female", 10)
 * val updatedData = modifyNurseData(nurseData, "Male")
 * println(updatedData) // Output: ["Alice", 35, "Male", 10]
 */
fun modifyNurseData(nurseData: List<Any>, updatedGender: String): List<Any> {

    // Extract individual fields from the nurseData list
    val name = nurseData[0]
    val age = nurseData[1]
    val gender = nurseData[2]
    val experience = nurseData[3]

    // Modify the gender field to the updated gender value
    val modifiedData = nurseData.toMutableList()
    modifiedData[2] = updatedGender

    // Return the updated nurse's data as a list
    return modifiedData
}