/**
 * This function takes in the name and age of an animal and returns the animal's name based on certain conditions
 */
fun findAnimalName(name: String?, age: Int): String {

    return when {
        age < 1 -> {
            if (name.isNullOrEmpty()) {
                "Unknown"
            } else {
                if (name.length < 5) name else "Unknown"
            }
        }
        age in 1..5 -> {
            if (name.isNullOrEmpty()) {
                "Young Animal"
            } else {
                "Young ${name.capitalize()}"
            }
        }
        else -> {
            if (name.isNullOrEmpty()) {
                "Unnamed Animal"
            } else {
                name.reversed().toUpperCase()
            }
        }
    }
}
/**
 * This function takes in the name and age of an animal and returns the animal's name based on certain conditions
 */
fun findAnimalName(name: String?, age: Int): String {
/**
 * This function takes in the name and age of an animal and returns the animal's name based on certain conditions
 */
fun findAnimalName(name: String?, age: Int): String {

    return when {
        age < 1 -> {
            if (name.isNullOrEmpty()) {
                "Unknown"
            } else {
                if (name.length < 5) name else "Unknown"
            }
        }
        age in 1..5 -> {
            if (name.isNullOrEmpty()) {
                "Young Animal"
            } else {
                "Young ${name.capitalize()}"
            }
        }
        else -> {
            if (name.isNullOrEmpty()) {
                "Unnamed Animal"
            } else {
                name.reversed().toUpperCase()
            }
        }
    }
}