/**
 * This function returns the status of a pilot based on the fuel level and the weather conditions.
 *
 * @param fuelLevel The remaining fuel level in gallons.
 * @param weather The current weather condition.
 * @return The status of the pilot, indicating whether they can take off, need to refuel, or wait for better weather.
 *
 * Note:
 * - If the fuel level is less than or equal to 10 gallons, the pilot cannot take off.
 * - If the fuel level is less than or equal to 50 gallons, the pilot needs to refuel.
 * - If the weather condition is "stormy", the pilot should wait for better weather to take off.
 * - If none of the above conditions are met, the pilot can take off.
 */
fun pilotStatus(fuelLevel: Double, weather: String): String {

    return when {
        fuelLevel <= 10 -> "Cannot take off. Low fuel level!"
        fuelLevel <= 50 -> "Need to refuel before taking off."
        weather == "stormy" -> "Wait for better weather condition to take off."
        else -> "Ready for takeoff!"
    }
}

val fuel = 30.5
/**
 * This function returns the status of a pilot based on the fuel level and the weather conditions.
 *
 * @param fuelLevel The remaining fuel level in gallons.
 * @param weather The current weather condition.
 * @return The status of the pilot, indicating whether they can take off, need to refuel, or wait for better weather.
 *
 * Note:
 * - If the fuel level is less than or equal to 10 gallons, the pilot cannot take off.
 * - If the fuel level is less than or equal to 50 gallons, the pilot needs to refuel.
 * - If the weather condition is "stormy", the pilot should wait for better weather to take off.
 * - If none of the above conditions are met, the pilot can take off.
 */
fun pilotStatus(fuelLevel: Double, weather: String): String {
/**
 * This function returns the status of a pilot based on the fuel level and the weather conditions.
 *
 * @param fuelLevel The remaining fuel level in gallons.
 * @param weather The current weather condition.
 * @return The status of the pilot, indicating whether they can take off, need to refuel, or wait for better weather.
 *
 * Note:
 * - If the fuel level is less than or equal to 10 gallons, the pilot cannot take off.
 * - If the fuel level is less than or equal to 50 gallons, the pilot needs to refuel.
 * - If the weather condition is "stormy", the pilot should wait for better weather to take off.
 * - If none of the above conditions are met, the pilot can take off.
 */
fun pilotStatus(fuelLevel: Double, weather: String): String {

    return when {
        fuelLevel <= 10 -> "Cannot take off. Low fuel level!"
        fuelLevel <= 50 -> "Need to refuel before taking off."
        weather == "stormy" -> "Wait for better weather condition to take off."
        else -> "Ready for takeoff!"
    }
}

val fuel = 30.5