/**
 * Given a list of animals and a target animal, find the index of the target animal in the list using a while loop.
 *
 * @param animalList A list of animals.
 * @param targetAnimal The animal to search for.
 * @return The index of the target animal in the list. If the target animal is not found in the list, returns -1.
 */
fun findAnimal(animalList: List<String>, targetAnimal: String): Int {

    var index = 0
    while (index < animalList.size) {
        if (animalList[index] == targetAnimal) {
            return index
        }
        index++
    }
    return -1
}
/**
 * Given a list of animals and a target animal, find the index of the target animal in the list using a while loop.
 *
 * @param animalList A list of animals.
 * @param targetAnimal The animal to search for.
 * @return The index of the target animal in the list. If the target animal is not found in the list, returns -1.
 */
fun findAnimal(animalList: List<String>, targetAnimal: String): Int {
/**
 * Given a list of animals and a target animal, find the index of the target animal in the list using a while loop.
 *
 * @param animalList A list of animals.
 * @param targetAnimal The animal to search for.
 * @return The index of the target animal in the list. If the target animal is not found in the list, returns -1.
 */
fun findAnimal(animalList: List<String>, targetAnimal: String): Int {

    var index = 0
    while (index < animalList.size) {
        if (animalList[index] == targetAnimal) {
            return index
        }
        index++
    }
    return -1
}