/**
 * Given two tuples, this function concatenates the even numbers from each tuple. The result is a new tuple.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing the even numbers from tuple1 and tuple2 concatenated.
 */
fun concatenateEvenNumbers(tuple1: List<Int>, tuple2: List<Int>): List<Int> {

    val result = mutableListOf<Int>()

    // Loop through tuple1
    for (num in tuple1) {
        if (num % 2 == 0) {
            result.add(num)
        }
    }

    // Loop through tuple2
    for (num in tuple2) {
        if (num % 2 == 0) {
            result.add(num)
        }
    }

    return result
}
/**
 * Given two tuples, this function concatenates the even numbers from each tuple. The result is a new tuple.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing the even numbers from tuple1 and tuple2 concatenated.
 */
fun concatenateEvenNumbers(tuple1: List<Int>, tuple2: List<Int>): List<Int> {
/**
 * Given two tuples, this function concatenates the even numbers from each tuple. The result is a new tuple.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing the even numbers from tuple1 and tuple2 concatenated.
 */
fun concatenateEvenNumbers(tuple1: List<Int>, tuple2: List<Int>): List<Int> {

    val result = mutableListOf<Int>()

    // Loop through tuple1
    for (num in tuple1) {
        if (num % 2 == 0) {
            result.add(num)
        }
    }

    // Loop through tuple2
    for (num in tuple2) {
        if (num % 2 == 0) {
            result.add(num)
        }
    }

    return result
}