/**
 * This function takes two lists as input: speciesList (a list of animal species) and isSickList
 * (a list indicating whether each animal is sick or not). It returns the count of animals that are healthy.
 *
 * @param speciesList A list of animal species.
 * @param isSickList A list indicating whether each animal is sick or not (true if sick, false if healthy).
 * @return The count of healthy animals.
 *
 * Example:
 * speciesList = listOf("Dog", "Cat", "Bird", "Rabbit", "Snake")
 * isSickList = listOf(false, false, true, false, false)
 * countAnimals(speciesList, isSickList) // Output: 4
 */
fun countAnimals(speciesList: List<String>, isSickList: List<Boolean>): Int {

    var healthyAnimals = 0

    for ((index, isSick) in isSickList.withIndex()) {
        if (!isSick) {
            healthyAnimals++
        }
    }

    return healthyAnimals
}
/**
 * This function takes two lists as input: speciesList (a list of animal species) and isSickList
 * (a list indicating whether each animal is sick or not). It returns the count of animals that are healthy.
 *
 * @param speciesList A list of animal species.
 * @param isSickList A list indicating whether each animal is sick or not (true if sick, false if healthy).
 * @return The count of healthy animals.
 *
 * Example:
 * speciesList = listOf("Dog", "Cat", "Bird", "Rabbit", "Snake")
 * isSickList = listOf(false, false, true, false, false)
 * countAnimals(speciesList, isSickList) // Output: 4
 */
fun countAnimals(speciesList: List<String>, isSickList: List<Boolean>): Int {
/**
 * This function takes two lists as input: speciesList (a list of animal species) and isSickList
 * (a list indicating whether each animal is sick or not). It returns the count of animals that are healthy.
 *
 * @param speciesList A list of animal species.
 * @param isSickList A list indicating whether each animal is sick or not (true if sick, false if healthy).
 * @return The count of healthy animals.
 *
 * Example:
 * speciesList = listOf("Dog", "Cat", "Bird", "Rabbit", "Snake")
 * isSickList = listOf(false, false, true, false, false)
 * countAnimals(speciesList, isSickList) // Output: 4
 */
fun countAnimals(speciesList: List<String>, isSickList: List<Boolean>): Int {

    var healthyAnimals = 0

    for ((index, isSick) in isSickList.withIndex()) {
        if (!isSick) {
            healthyAnimals++
        }
    }

    return healthyAnimals
}