/**
 * This function is used to check the compliance of an electrician's work based on the voltage and current provided.
 *
 * @param voltage The voltage in volts.
 * @param current The current in amperes.
 * @return A message indicating whether the work is compliant or not.
 */
fun electrianComplianceChecker(voltage: Int, current: Float): String {

    // Check if the voltage is within the permissible range
    val voltageCheck = if (voltage in 220..240) "Voltage is compliant." else "Voltage is not compliant."

    // Check if the current is within the permissible range
    val currentCheck = if (current in 15.0..20.0) "Current is compliant." else "Current is not compliant."

    return when {
        voltageCheck == "Voltage is compliant." && currentCheck == "Current is compliant." ->
            "The work is compliant and meets all the required standards."
        voltageCheck == "Voltage is compliant." && currentCheck == "Current is not compliant." ->
            "The current is not compliant. Please ensure it is within the permissible range."
        else -> "The work is not compliant. Please check the voltage and current values."
    }
}
/**
 * This function is used to check the compliance of an electrician's work based on the voltage and current provided.
 *
 * @param voltage The voltage in volts.
 * @param current The current in amperes.
 * @return A message indicating whether the work is compliant or not.
 */
fun electrianComplianceChecker(voltage: Int, current: Float): String {
/**
 * This function is used to check the compliance of an electrician's work based on the voltage and current provided.
 *
 * @param voltage The voltage in volts.
 * @param current The current in amperes.
 * @return A message indicating whether the work is compliant or not.
 */
fun electrianComplianceChecker(voltage: Int, current: Float): String {

    // Check if the voltage is within the permissible range
    val voltageCheck = if (voltage in 220..240) "Voltage is compliant." else "Voltage is not compliant."

    // Check if the current is within the permissible range
    val currentCheck = if (current in 15.0..20.0) "Current is compliant." else "Current is not compliant."

    return when {
        voltageCheck == "Voltage is compliant." && currentCheck == "Current is compliant." ->
            "The work is compliant and meets all the required standards."
        voltageCheck == "Voltage is compliant." && currentCheck == "Current is not compliant." ->
            "The current is not compliant. Please ensure it is within the permissible range."
        else -> "The work is not compliant. Please check the voltage and current values."
    }
}