/**
 * This function takes two boolean parameters - fire and smoke.
 * It uses nested ternary operators along with the NOT operator
 * to determine the firefighter's action based on the inputs.
 * The function returns a string that determines the firefighter's action.
 *
 * @param fire represents the presence of fire
 * @param smoke represents the presence of smoke
 * @return action to be taken by the firefighter
 */
fun extinguishFire(fire: Boolean, smoke: Boolean): String {

    val action = if (!fire) "Standby" else if (!smoke) "Evacuate" else if (listOf(true, false).random()) "Rescue" else ""
    return action
}
/**
 * This function takes two boolean parameters - fire and smoke.
 * It uses nested ternary operators along with the NOT operator
 * to determine the firefighter's action based on the inputs.
 * The function returns a string that determines the firefighter's action.
 *
 * @param fire represents the presence of fire
 * @param smoke represents the presence of smoke
 * @return action to be taken by the firefighter
 */
fun extinguishFire(fire: Boolean, smoke: Boolean): String {
/**
 * This function takes two boolean parameters - fire and smoke.
 * It uses nested ternary operators along with the NOT operator
 * to determine the firefighter's action based on the inputs.
 * The function returns a string that determines the firefighter's action.
 *
 * @param fire represents the presence of fire
 * @param smoke represents the presence of smoke
 * @return action to be taken by the firefighter
 */
fun extinguishFire(fire: Boolean, smoke: Boolean): String {

    val action = if (!fire) "Standby" else if (!smoke) "Evacuate" else if (listOf(true, false).random()) "Rescue" else ""
    return action
}