/**
 * This function takes two sets, teachers and students,
 * and returns a new set containing the names of teachers who are also students or vice versa.
 *
 * @param teachers A set of teacher names
 * @param students A set of student names
 * @return A new set containing the intersection of teachers and students
 */
fun intersectionLoopSetOrOperator(teachers: Set<String>, students: Set<String>): Set<String> {

    // Initializing an empty set to store the intersection
    val intersectionSet = mutableSetOf<String>()

    // Looping through the teachers set
    for (teacher in teachers) {
        // Checking if the teacher is also a student or vice versa
        if (teacher in students) {
            // Adding the teacher's name to the intersection set
            intersectionSet.add(teacher)
        }
    }

    return intersectionSet
}
/**
 * This function takes two sets, teachers and students,
 * and returns a new set containing the names of teachers who are also students or vice versa.
 *
 * @param teachers A set of teacher names
 * @param students A set of student names
 * @return A new set containing the intersection of teachers and students
 */
fun intersectionLoopSetOrOperator(teachers: Set<String>, students: Set<String>): Set<String> {
/**
 * This function takes two sets, teachers and students,
 * and returns a new set containing the names of teachers who are also students or vice versa.
 *
 * @param teachers A set of teacher names
 * @param students A set of student names
 * @return A new set containing the intersection of teachers and students
 */
fun intersectionLoopSetOrOperator(teachers: Set<String>, students: Set<String>): Set<String> {

    // Initializing an empty set to store the intersection
    val intersectionSet = mutableSetOf<String>()

    // Looping through the teachers set
    for (teacher in teachers) {
        // Checking if the teacher is also a student or vice versa
        if (teacher in students) {
            // Adding the teacher's name to the intersection set
            intersectionSet.add(teacher)
        }
    }

    return intersectionSet
}