/**
 * This function checks the flight safety based on the fuel level and altitude.
 *
 * @param fuelLevel The remaining fuel level in liters.
 * @param altitude The altitude of the aircraft in meters.
 * @return A message indicating whether the flight is safe or not.
 */
fun checkFlightSafety(fuelLevel: Double, altitude: Int): String {

    return when {
        fuelLevel < 100 && altitude > 10000 -> "Unsafe - Low fuel level and high altitude"
        fuelLevel < 100 -> "Unsafe - Low fuel level"
        altitude > 10000 -> "Unsafe - High altitude"
        fuelLevel >= 300 && altitude <= 5000 -> "Safe - Normal flight conditions"
        fuelLevel >= 200 && altitude in 5001..10000 -> "Safe - Normal flight conditions"
        else -> "Unknown condition - Please recheck given parameters"
    }
}
/**
 * This function checks the flight safety based on the fuel level and altitude.
 *
 * @param fuelLevel The remaining fuel level in liters.
 * @param altitude The altitude of the aircraft in meters.
 * @return A message indicating whether the flight is safe or not.
 */
fun checkFlightSafety(fuelLevel: Double, altitude: Int): String {
/**
 * This function checks the flight safety based on the fuel level and altitude.
 *
 * @param fuelLevel The remaining fuel level in liters.
 * @param altitude The altitude of the aircraft in meters.
 * @return A message indicating whether the flight is safe or not.
 */
fun checkFlightSafety(fuelLevel: Double, altitude: Int): String {

    return when {
        fuelLevel < 100 && altitude > 10000 -> "Unsafe - Low fuel level and high altitude"
        fuelLevel < 100 -> "Unsafe - Low fuel level"
        altitude > 10000 -> "Unsafe - High altitude"
        fuelLevel >= 300 && altitude <= 5000 -> "Safe - Normal flight conditions"
        fuelLevel >= 200 && altitude in 5001..10000 -> "Safe - Normal flight conditions"
        else -> "Unknown condition - Please recheck given parameters"
    }
}