/**
 * Given the number of people in a building and the intensity of a fire, this function determines the actions
 * a firefighter should take based on the conditions specified in the code below.
 *
 * @param numPeople The number of people trapped in the building.
 * @param fireIntensity The level of fire intensity in the building.
 * @return Instructions for the firefighter.
 *
 * Note:
 * - If the fire intensity is greater than 100, the firefighter should immediately evacuate the building.
 * - If there are no people trapped in the building, the firefighter should contain and extinguish the fire.
 * - If the number of people is odd and the fire intensity is less than 50, the firefighter should rescue the people
 *   first and then contain and extinguish the fire.
 * - If the number of people is even and the fire intensity is between 50 and 100, the firefighter should prioritize
 *   containing and extinguishing the fire before rescuing the people.
 */
fun firefighterCode(numPeople: Int, fireIntensity: Float): String {

    if (fireIntensity > 100) {
        return "Evacuate the building immediately!"
    }

    if (numPeople == 0) {
        return "Contain and extinguish the fire"
    }

    if (numPeople % 2 != 0 && fireIntensity < 50) {
        return "Rescue the people first and then contain and extinguish the fire"
    }

    if (numPeople % 2 == 0 && fireIntensity in 50.0..100.0) {
        return "Contain and extinguish the fire before rescuing the people"
    }

    return "No specific action required at the moment"
}
/**
 * Given the number of people in a building and the intensity of a fire, this function determines the actions
 * a firefighter should take based on the conditions specified in the code below.
 *
 * @param numPeople The number of people trapped in the building.
 * @param fireIntensity The level of fire intensity in the building.
 * @return Instructions for the firefighter.
 *
 * Note:
 * - If the fire intensity is greater than 100, the firefighter should immediately evacuate the building.
 * - If there are no people trapped in the building, the firefighter should contain and extinguish the fire.
 * - If the number of people is odd and the fire intensity is less than 50, the firefighter should rescue the people
 *   first and then contain and extinguish the fire.
 * - If the number of people is even and the fire intensity is between 50 and 100, the firefighter should prioritize
 *   containing and extinguishing the fire before rescuing the people.
 */
fun firefighterCode(numPeople: Int, fireIntensity: Float): String {
/**
 * Given the number of people in a building and the intensity of a fire, this function determines the actions
 * a firefighter should take based on the conditions specified in the code below.
 *
 * @param numPeople The number of people trapped in the building.
 * @param fireIntensity The level of fire intensity in the building.
 * @return Instructions for the firefighter.
 *
 * Note:
 * - If the fire intensity is greater than 100, the firefighter should immediately evacuate the building.
 * - If there are no people trapped in the building, the firefighter should contain and extinguish the fire.
 * - If the number of people is odd and the fire intensity is less than 50, the firefighter should rescue the people
 *   first and then contain and extinguish the fire.
 * - If the number of people is even and the fire intensity is between 50 and 100, the firefighter should prioritize
 *   containing and extinguishing the fire before rescuing the people.
 */
fun firefighterCode(numPeople: Int, fireIntensity: Float): String {

    if (fireIntensity > 100) {
        return "Evacuate the building immediately!"
    }

    if (numPeople == 0) {
        return "Contain and extinguish the fire"
    }

    if (numPeople % 2 != 0 && fireIntensity < 50) {
        return "Rescue the people first and then contain and extinguish the fire"
    }

    if (numPeople % 2 == 0 && fireIntensity in 50.0..100.0) {
        return "Contain and extinguish the fire before rescuing the people"
    }

    return "No specific action required at the moment"
}