/**
 * This function determines if the Mars rover can launch based on the given parameters.
 *
 * @param roverSpeed The speed of the rover in km/h.
 * @param roverTemperature The temperature of the rover in degrees Celsius.
 * @param roverPower A boolean value indicating whether the rover has enough power.
 * @return A message indicating whether the rover can launch based on the given parameters.
 */
fun launchSequence(roverSpeed: Int, roverTemperature: Float, roverPower: Boolean): String {

    // Check if the rover speed is within the acceptable range
    if (roverSpeed in 0..100) {
        // Check if the rover temperature is within the acceptable range
        if (roverTemperature in -20.0..50.0) {
            // Check if the rover has enough power
            if (roverPower) {
                return "Launch successful! The Mars rover is ready to explore."
            } else {
                return "Launch failed! The Mars rover does not have enough power."
            }
        } else {
            return "Launch failed! The Mars rover temperature is outside the acceptable range."
        }
    } else {
        return "Launch failed! The Mars rover speed is outside the acceptable range."
    }
}

// Determine if the Mars rover can launch
/**
 * This function determines if the Mars rover can launch based on the given parameters.
 *
 * @param roverSpeed The speed of the rover in km/h.
 * @param roverTemperature The temperature of the rover in degrees Celsius.
 * @param roverPower A boolean value indicating whether the rover has enough power.
 * @return A message indicating whether the rover can launch based on the given parameters.
 */
fun launchSequence(roverSpeed: Int, roverTemperature: Float, roverPower: Boolean): String {
/**
 * This function determines if the Mars rover can launch based on the given parameters.
 *
 * @param roverSpeed The speed of the rover in km/h.
 * @param roverTemperature The temperature of the rover in degrees Celsius.
 * @param roverPower A boolean value indicating whether the rover has enough power.
 * @return A message indicating whether the rover can launch based on the given parameters.
 */
fun launchSequence(roverSpeed: Int, roverTemperature: Float, roverPower: Boolean): String {

    // Check if the rover speed is within the acceptable range
    if (roverSpeed in 0..100) {
        // Check if the rover temperature is within the acceptable range
        if (roverTemperature in -20.0..50.0) {
            // Check if the rover has enough power
            if (roverPower) {
                return "Launch successful! The Mars rover is ready to explore."
            } else {
                return "Launch failed! The Mars rover does not have enough power."
            }
        } else {
            return "Launch failed! The Mars rover temperature is outside the acceptable range."
        }
    } else {
        return "Launch failed! The Mars rover speed is outside the acceptable range."
    }
}

// Determine if the Mars rover can launch