/**
 * You have been given two dictionaries 'dictionary1' and 'dictionary2'. Your task is to write a function that returns a new dictionary which contains the intersection of the keys present in both dictionaries. The values of the common keys should be a boolean indicating whether the corresponding values in dictionary1 and dictionary2 are both True or not. If a key is not present in either of the dictionaries, it should not be included in the resulting dictionary. Your solution should only use dictionary methods and the OR operator. The function should return the resulting dictionary.
 */
fun dictionaryMethodsOrOperator(dictionary1: Map<String, Boolean>, dictionary2: Map<String, Boolean>): Map<String, Boolean> {

    val intersection = mutableMapOf<String, Boolean>()
    for ((key1, value1) in dictionary1) {
        if (dictionary2.containsKey(key1)) {
            intersection[key1] = value1 || dictionary2[key1]!!
        }
    }
    return intersection
}
/**
 * You have been given two dictionaries 'dictionary1' and 'dictionary2'. Your task is to write a function that returns a new dictionary which contains the intersection of the keys present in both dictionaries. The values of the common keys should be a boolean indicating whether the corresponding values in dictionary1 and dictionary2 are both True or not. If a key is not present in either of the dictionaries, it should not be included in the resulting dictionary. Your solution should only use dictionary methods and the OR operator. The function should return the resulting dictionary.
 */
fun dictionaryMethodsOrOperator(dictionary1: Map<String, Boolean>, dictionary2: Map<String, Boolean>): Map<String, Boolean> {
/**
 * You have been given two dictionaries 'dictionary1' and 'dictionary2'. Your task is to write a function that returns a new dictionary which contains the intersection of the keys present in both dictionaries. The values of the common keys should be a boolean indicating whether the corresponding values in dictionary1 and dictionary2 are both True or not. If a key is not present in either of the dictionaries, it should not be included in the resulting dictionary. Your solution should only use dictionary methods and the OR operator. The function should return the resulting dictionary.
 */
fun dictionaryMethodsOrOperator(dictionary1: Map<String, Boolean>, dictionary2: Map<String, Boolean>): Map<String, Boolean> {

    val intersection = mutableMapOf<String, Boolean>()
    for ((key1, value1) in dictionary1) {
        if (dictionary2.containsKey(key1)) {
            intersection[key1] = value1 || dictionary2[key1]!!
        }
    }
    return intersection
}