/**
 * This exercise aims to test your understanding of nested logical operators and adding elements to a set.
 *
 * You are given two sets containing integers, set1 and set2. Your task is to create a new set, set3, which will
 * contain the elements that satisfy the following conditions:
 *
 * 1. The element must be present in either set1 or set2, but not both.
 * 2. The element must be an even number.
 * 3. The element must be greater than 10.
 *
 * You need to complete the code below to solve this exercise.
 */
fun addToSetBasedOnCondition(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val set3 = mutableSetOf<Int>()

    for (element in set1) {
        if (element !in set2 && element % 2 == 0 && element > 10) {
            set3.add(element)
        }
    }

    for (element in set2) {
        if (element !in set1 && element % 2 == 0 && element > 10) {
            set3.add(element)
        }
    }

    return set3
}
/**
 * This exercise aims to test your understanding of nested logical operators and adding elements to a set.
 *
 * You are given two sets containing integers, set1 and set2. Your task is to create a new set, set3, which will
 * contain the elements that satisfy the following conditions:
 *
 * 1. The element must be present in either set1 or set2, but not both.
 * 2. The element must be an even number.
 * 3. The element must be greater than 10.
 *
 * You need to complete the code below to solve this exercise.
 */
fun addToSetBasedOnCondition(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This exercise aims to test your understanding of nested logical operators and adding elements to a set.
 *
 * You are given two sets containing integers, set1 and set2. Your task is to create a new set, set3, which will
 * contain the elements that satisfy the following conditions:
 *
 * 1. The element must be present in either set1 or set2, but not both.
 * 2. The element must be an even number.
 * 3. The element must be greater than 10.
 *
 * You need to complete the code below to solve this exercise.
 */
fun addToSetBasedOnCondition(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val set3 = mutableSetOf<Int>()

    for (element in set1) {
        if (element !in set2 && element % 2 == 0 && element > 10) {
            set3.add(element)
        }
    }

    for (element in set2) {
        if (element !in set1 && element % 2 == 0 && element > 10) {
            set3.add(element)
        }
    }

    return set3
}