/**
 * Given a dictionary of electrical equipment and their status, this function checks for any faults and returns a list of faulty equipment.
 *
 * @param equipmentDict A dictionary mapping electrical equipment to their status (ON/OFF).
 * @return A list of electrical equipment that have faulty status.
 *
 * Example:
 * checkElectricalFaults(mapOf("Lights" to "ON", "AC" to "OFF", "Fridge" to "ON", "TV" to "OFF")) returns ['AC', 'TV']
 */
fun checkElectricalFaults(equipmentDict: Map<String, String>): List<String> {

    val faultyEquipment = mutableListOf<String>()

    for ((equipment, status) in equipmentDict) {
        if (status == "OFF") {
            faultyEquipment.add(equipment)
        }
    }

    return faultyEquipment
}
/**
 * Given a dictionary of electrical equipment and their status, this function checks for any faults and returns a list of faulty equipment.
 *
 * @param equipmentDict A dictionary mapping electrical equipment to their status (ON/OFF).
 * @return A list of electrical equipment that have faulty status.
 *
 * Example:
 * checkElectricalFaults(mapOf("Lights" to "ON", "AC" to "OFF", "Fridge" to "ON", "TV" to "OFF")) returns ['AC', 'TV']
 */
fun checkElectricalFaults(equipmentDict: Map<String, String>): List<String> {
/**
 * Given a dictionary of electrical equipment and their status, this function checks for any faults and returns a list of faulty equipment.
 *
 * @param equipmentDict A dictionary mapping electrical equipment to their status (ON/OFF).
 * @return A list of electrical equipment that have faulty status.
 *
 * Example:
 * checkElectricalFaults(mapOf("Lights" to "ON", "AC" to "OFF", "Fridge" to "ON", "TV" to "OFF")) returns ['AC', 'TV']
 */
fun checkElectricalFaults(equipmentDict: Map<String, String>): List<String> {

    val faultyEquipment = mutableListOf<String>()

    for ((equipment, status) in equipmentDict) {
        if (status == "OFF") {
            faultyEquipment.add(equipment)
        }
    }

    return faultyEquipment
}