/**
 * This function determines the intersection between the availability of electricity and the number of connections
 * an electrician can handle at a given time.
 *
 * @param lightning True if power is available, False otherwise
 * @param connections Number of connections that need to be handled
 * @return A message indicating the intersection between the availability of electricity and the number of connections
 */
fun intersectionElectrician(lightning: Boolean, connections: Int): String {

    // Determine the intersection by using a when expression with multiple conditions
    val intersection = when {
        !lightning -> "Cannot handle connections due to lack of power."
        connections <= 0 -> "Cannot handle any connection."
        connections <= 5 -> "Can handle up to 5 connections."
        connections <= 10 -> "Can handle up to 10 connections."
        connections <= 15 -> "Can handle up to 15 connections."
        connections <= 20 -> "Can handle up to 20 connections."
        else -> "Can handle more than 20 connections."
    }
    return intersection
}
/**
 * This function determines the intersection between the availability of electricity and the number of connections
 * an electrician can handle at a given time.
 *
 * @param lightning True if power is available, False otherwise
 * @param connections Number of connections that need to be handled
 * @return A message indicating the intersection between the availability of electricity and the number of connections
 */
fun intersectionElectrician(lightning: Boolean, connections: Int): String {
/**
 * This function determines the intersection between the availability of electricity and the number of connections
 * an electrician can handle at a given time.
 *
 * @param lightning True if power is available, False otherwise
 * @param connections Number of connections that need to be handled
 * @return A message indicating the intersection between the availability of electricity and the number of connections
 */
fun intersectionElectrician(lightning: Boolean, connections: Int): String {

    // Determine the intersection by using a when expression with multiple conditions
    val intersection = when {
        !lightning -> "Cannot handle connections due to lack of power."
        connections <= 0 -> "Cannot handle any connection."
        connections <= 5 -> "Can handle up to 5 connections."
        connections <= 10 -> "Can handle up to 10 connections."
        connections <= 15 -> "Can handle up to 15 connections."
        connections <= 20 -> "Can handle up to 20 connections."
        else -> "Can handle more than 20 connections."
    }
    return intersection
}