/**
 * This function takes in two animals and returns the result of multiplying their values.
 * However, one of the animals needs to be either a land animal or a water animal.
 * Your task is to complete the code by using the AND and XOR operators to check the following conditions:
 * - If both animals are land animals, return 0.
 * - If both animals are water animals, return 0.
 * - If one animal is a land animal and the other is a water animal, return the product of the animals' values.
 *
 * @param animal1 The value of the first animal.
 * @param animal2 The value of the second animal.
 * @return The result of multiplying the animals' values based on the given conditions.
 */
fun animalTimesTwo(animal1: Int, animal2: Int): Int {

    if ((animal1 == 0 && animal2 != 0) || (animal1 != 0 && animal2 == 0)) {  // Check if one animal is a land animal and the other is a water animal
        return animal1 * animal2
    } else if (animal1 == 0 && animal2 == 0) {  // Check if both animals are land animals or both are water animals
        return 0
    }
    return 0
}
/**
 * This function takes in two animals and returns the result of multiplying their values.
 * However, one of the animals needs to be either a land animal or a water animal.
 * Your task is to complete the code by using the AND and XOR operators to check the following conditions:
 * - If both animals are land animals, return 0.
 * - If both animals are water animals, return 0.
 * - If one animal is a land animal and the other is a water animal, return the product of the animals' values.
 *
 * @param animal1 The value of the first animal.
 * @param animal2 The value of the second animal.
 * @return The result of multiplying the animals' values based on the given conditions.
 */
fun animalTimesTwo(animal1: Int, animal2: Int): Int {
/**
 * This function takes in two animals and returns the result of multiplying their values.
 * However, one of the animals needs to be either a land animal or a water animal.
 * Your task is to complete the code by using the AND and XOR operators to check the following conditions:
 * - If both animals are land animals, return 0.
 * - If both animals are water animals, return 0.
 * - If one animal is a land animal and the other is a water animal, return the product of the animals' values.
 *
 * @param animal1 The value of the first animal.
 * @param animal2 The value of the second animal.
 * @return The result of multiplying the animals' values based on the given conditions.
 */
fun animalTimesTwo(animal1: Int, animal2: Int): Int {

    if ((animal1 == 0 && animal2 != 0) || (animal1 != 0 && animal2 == 0)) {  // Check if one animal is a land animal and the other is a water animal
        return animal1 * animal2
    } else if (animal1 == 0 && animal2 == 0) {  // Check if both animals are land animals or both are water animals
        return 0
    }
    return 0
}