/**
 * This function simulates an electrician's work at a given location, completing tasks using when statements and identity comparison.
 *
 * @param location The location where the electrician is working.
 * @param tasks The list of tasks to be completed.
 * @return The number of completed tasks.
 */
fun electricianWork(location: String, tasks: List<String>): Int {

    var completedTasks = 0

    for (task in tasks) {
        when (task) {
            "Inspect" -> {
                // Insert code here to inspect the location's electrical setup
                println("Inspecting the electrical setup at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Repair" -> {
                // Insert code here to repair any electrical issues
                println("Repairing electrical issues at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Install" -> {
                // Insert code here to install new electrical equipment
                println("Installing new electrical equipment at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Break" -> {
                // Insert code here to simulate a break for the electrician
            }
        }
    }

    return completedTasks
}
/**
 * This function simulates an electrician's work at a given location, completing tasks using when statements and identity comparison.
 *
 * @param location The location where the electrician is working.
 * @param tasks The list of tasks to be completed.
 * @return The number of completed tasks.
 */
fun electricianWork(location: String, tasks: List<String>): Int {
/**
 * This function simulates an electrician's work at a given location, completing tasks using when statements and identity comparison.
 *
 * @param location The location where the electrician is working.
 * @param tasks The list of tasks to be completed.
 * @return The number of completed tasks.
 */
fun electricianWork(location: String, tasks: List<String>): Int {

    var completedTasks = 0

    for (task in tasks) {
        when (task) {
            "Inspect" -> {
                // Insert code here to inspect the location's electrical setup
                println("Inspecting the electrical setup at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Repair" -> {
                // Insert code here to repair any electrical issues
                println("Repairing electrical issues at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Install" -> {
                // Insert code here to install new electrical equipment
                println("Installing new electrical equipment at $location")
                println("Completing task: $task")
                completedTasks++
            }
            "Break" -> {
                // Insert code here to simulate a break for the electrician
            }
        }
    }

    return completedTasks
}