/**
 * Given three lists: ages (Int), employment status (Boolean), and education status (Boolean),
 * this function calculates the number of social workers who are both employed and educated.
 *
 * @param ages List of ages of the social workers
 * @param isEmployed List of employment status of the social workers, true for employed, false otherwise
 * @param isEducated List of education status of the social workers, true for educated, false otherwise
 * @return Number of social workers who are both employed and educated
 */
fun countSocialWorkers(ages: List<Int>, isEmployed: List<Boolean>, isEducated: List<Boolean>): Int {

    var socialWorkers = 0

    // Iterate over the lists simultaneously
    for ((index, employed) in isEmployed.withIndex()) {
        val educated = isEducated.getOrNull(index)

        // Check if the social worker is employed and educated using logical operators
        if (employed && educated == true) {
            socialWorkers++
        }
    }

    return socialWorkers
}
/**
 * Given three lists: ages (Int), employment status (Boolean), and education status (Boolean),
 * this function calculates the number of social workers who are both employed and educated.
 *
 * @param ages List of ages of the social workers
 * @param isEmployed List of employment status of the social workers, true for employed, false otherwise
 * @param isEducated List of education status of the social workers, true for educated, false otherwise
 * @return Number of social workers who are both employed and educated
 */
fun countSocialWorkers(ages: List<Int>, isEmployed: List<Boolean>, isEducated: List<Boolean>): Int {
/**
 * Given three lists: ages (Int), employment status (Boolean), and education status (Boolean),
 * this function calculates the number of social workers who are both employed and educated.
 *
 * @param ages List of ages of the social workers
 * @param isEmployed List of employment status of the social workers, true for employed, false otherwise
 * @param isEducated List of education status of the social workers, true for educated, false otherwise
 * @return Number of social workers who are both employed and educated
 */
fun countSocialWorkers(ages: List<Int>, isEmployed: List<Boolean>, isEducated: List<Boolean>): Int {

    var socialWorkers = 0

    // Iterate over the lists simultaneously
    for ((index, employed) in isEmployed.withIndex()) {
        val educated = isEducated.getOrNull(index)

        // Check if the social worker is employed and educated using logical operators
        if (employed && educated == true) {
            socialWorkers++
        }
    }

    return socialWorkers
}