/**
 * The exercise requires creating a tuple from a given string and performing an addition operation.
 *
 * @param string A string containing numerical values separated by commas.
 * @param number An integer number for performing the addition operation.
 * @return A tuple consisting of the individual numerical values from string and the result of the addition operation.
 *
 * Example:
 * createTupleFromStringAndAddition("3,5,9,2,4", 7) -> (3, 5, 9, 2, 4, 30)
 */
fun createTupleFromStringAndAddition(string: String, number: Int): Triple<List<Int>, Int, List<Int>> {

    // Split the string into individual values
    val values = string.split(",").map { it.toInt() }

    // Perform the addition operation
    val result = values.sum() + number

    // Create a tuple from the string values and the result
    val finalTuple = Triple(values, result, listOf(result))

    return finalTuple
}
/**
 * The exercise requires creating a tuple from a given string and performing an addition operation.
 *
 * @param string A string containing numerical values separated by commas.
 * @param number An integer number for performing the addition operation.
 * @return A tuple consisting of the individual numerical values from string and the result of the addition operation.
 *
 * Example:
 * createTupleFromStringAndAddition("3,5,9,2,4", 7) -> (3, 5, 9, 2, 4, 30)
 */
fun createTupleFromStringAndAddition(string: String, number: Int): Triple<List<Int>, Int, List<Int>> {
/**
 * The exercise requires creating a tuple from a given string and performing an addition operation.
 *
 * @param string A string containing numerical values separated by commas.
 * @param number An integer number for performing the addition operation.
 * @return A tuple consisting of the individual numerical values from string and the result of the addition operation.
 *
 * Example:
 * createTupleFromStringAndAddition("3,5,9,2,4", 7) -> (3, 5, 9, 2, 4, 30)
 */
fun createTupleFromStringAndAddition(string: String, number: Int): Triple<List<Int>, Int, List<Int>> {

    // Split the string into individual values
    val values = string.split(",").map { it.toInt() }

    // Perform the addition operation
    val result = values.sum() + number

    // Create a tuple from the string values and the result
    val finalTuple = Triple(values, result, listOf(result))

    return finalTuple
}