/**
 * Given a list of animals and a name, this function checks if the name is present in the animal list.
 * If it is present, it returns the index of the name in the animal list.
 * If it is not present, it returns null.
 */
fun findAnimal(animals: List<String>, name: String): Int? {

    for ((index, animal) in animals.withIndex()) {
        if (animal == name) {
            return index
        }
    }
    return null
}
/**
 * Given a list of animals and a name, this function checks if the name is present in the animal list.
 * If it is present, it returns the index of the name in the animal list.
 * If it is not present, it returns null.
 */
fun findAnimal(animals: List<String>, name: String): Int? {
/**
 * Given a list of animals and a name, this function checks if the name is present in the animal list.
 * If it is present, it returns the index of the name in the animal list.
 * If it is not present, it returns null.
 */
fun findAnimal(animals: List<String>, name: String): Int? {

    for ((index, animal) in animals.withIndex()) {
        if (animal == name) {
            return index
        }
    }
    return null
}