/**
 * Given two tuples, return the intersection of their elements excluding duplicates.
 * If there is no intersection, return an empty list. You must solve this exercise without using
 * the ternary operator 'if-else' in the code.
 */
fun calculateIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Create an empty list to store the intersection elements
    val intersection = mutableListOf<Any>()

    // Loop through the first tuple
    for (element in tuple1) {
        // Check if the element exists in the second tuple but not already in the intersection list
        if (element in tuple2 && element !in intersection) {
            intersection.add(element)
        }
    }

    return intersection
}
/**
 * Given two tuples, return the intersection of their elements excluding duplicates.
 * If there is no intersection, return an empty list. You must solve this exercise without using
 * the ternary operator 'if-else' in the code.
 */
fun calculateIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {
/**
 * Given two tuples, return the intersection of their elements excluding duplicates.
 * If there is no intersection, return an empty list. You must solve this exercise without using
 * the ternary operator 'if-else' in the code.
 */
fun calculateIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Create an empty list to store the intersection elements
    val intersection = mutableListOf<Any>()

    // Loop through the first tuple
    for (element in tuple1) {
        // Check if the element exists in the second tuple but not already in the intersection list
        if (element in tuple2 && element !in intersection) {
            intersection.add(element)
        }
    }

    return intersection
}