/**
 * Your friend, an anthropologist, is studying a tribe of indigenous people. They have a unique way of counting animals.
 * They continue counting animals until they find a specific animal. In this exercise, your task is to complete the code
 * to count the number of animals until the target animal is found.
 *
 * The function 'countAnimals' takes a list of animals as input and a target animal as an argument. The function should
 * return the number of animals counted before reaching the target animal. You need to complete the code by using a
 * 'continue' statement.
 *
 * @param animals A list of animals.
 * @param targetAnimal The animal to be searched for.
 * @return The number of animals counted before finding the target animal.
 */
fun countAnimals(animals: List<String>, targetAnimal: String): Int {

    var count = 0

    for (animal in animals) {
        count++
        if (animal == targetAnimal) {
            continue
        } else {
            continue
        }
    }

    return count
}
/**
 * Your friend, an anthropologist, is studying a tribe of indigenous people. They have a unique way of counting animals.
 * They continue counting animals until they find a specific animal. In this exercise, your task is to complete the code
 * to count the number of animals until the target animal is found.
 *
 * The function 'countAnimals' takes a list of animals as input and a target animal as an argument. The function should
 * return the number of animals counted before reaching the target animal. You need to complete the code by using a
 * 'continue' statement.
 *
 * @param animals A list of animals.
 * @param targetAnimal The animal to be searched for.
 * @return The number of animals counted before finding the target animal.
 */
fun countAnimals(animals: List<String>, targetAnimal: String): Int {
/**
 * Your friend, an anthropologist, is studying a tribe of indigenous people. They have a unique way of counting animals.
 * They continue counting animals until they find a specific animal. In this exercise, your task is to complete the code
 * to count the number of animals until the target animal is found.
 *
 * The function 'countAnimals' takes a list of animals as input and a target animal as an argument. The function should
 * return the number of animals counted before reaching the target animal. You need to complete the code by using a
 * 'continue' statement.
 *
 * @param animals A list of animals.
 * @param targetAnimal The animal to be searched for.
 * @return The number of animals counted before finding the target animal.
 */
fun countAnimals(animals: List<String>, targetAnimal: String): Int {

    var count = 0

    for (animal in animals) {
        count++
        if (animal == targetAnimal) {
            continue
        } else {
            continue
        }
    }

    return count
}