/**
 * Create a tuple from a range of values using nested ternary operators.
 *
 * Given a range of values from [rangeStart] to [rangeEnd] (inclusive), produce a tuple. However, there are requirements for the tuple construction that should be achieved using nested ternary operators.
 *
 * @return The resulting tuple.
 */
fun createTupleFromRangeAndNestedTernary(rangeStart: Int, rangeEnd: Int): List<Int> {

    // Initialize an empty list to store the values
    val values = mutableListOf<Int>()

    // Iterate through each value from rangeStart to rangeEnd (inclusive)
    for (i in rangeStart..rangeEnd) {
        // Append a specific value based on nested ternary operators
        // If a value is divisible by 2, store its square; otherwise, store its cube
        values.add(if (i % 2 == 0) i * i else i * i * i)
    }

    // Convert the list to a tuple (List in Kotlin)
    return values
}
/**
 * Create a tuple from a range of values using nested ternary operators.
 *
 * Given a range of values from [rangeStart] to [rangeEnd] (inclusive), produce a tuple. However, there are requirements for the tuple construction that should be achieved using nested ternary operators.
 *
 * @return The resulting tuple.
 */
fun createTupleFromRangeAndNestedTernary(rangeStart: Int, rangeEnd: Int): List<Int> {
/**
 * Create a tuple from a range of values using nested ternary operators.
 *
 * Given a range of values from [rangeStart] to [rangeEnd] (inclusive), produce a tuple. However, there are requirements for the tuple construction that should be achieved using nested ternary operators.
 *
 * @return The resulting tuple.
 */
fun createTupleFromRangeAndNestedTernary(rangeStart: Int, rangeEnd: Int): List<Int> {

    // Initialize an empty list to store the values
    val values = mutableListOf<Int>()

    // Iterate through each value from rangeStart to rangeEnd (inclusive)
    for (i in rangeStart..rangeEnd) {
        // Append a specific value based on nested ternary operators
        // If a value is divisible by 2, store its square; otherwise, store its cube
        values.add(if (i % 2 == 0) i * i else i * i * i)
    }

    // Convert the list to a tuple (List in Kotlin)
    return values
}