/**
 * This exercise is for a Zoologist to count the number of animal species that satisfy two conditions:
 * their weight is greater than a given weight limit OR their age is greater than a given age limit.
 *
 * @param animals a list of dictionaries, where each dictionary represents an animal with keys 'name', 'weight', 'age'.
 * @param weightLimit a float, the weight limit to consider.
 * @param ageLimit an int, the age limit to consider.
 * @return An integer representing the count of animal species that satisfy either weight or age conditions.
 */
fun countSpecies(animals: List<Map<String, Any>>, weightLimit: Float, ageLimit: Int): Int {

    var count = 0

    for (animal in animals) {
        if (animal["weight"] as Float > weightLimit || animal["age"] as Int > ageLimit) {
            count++
        }
    }

    return count
}
/**
 * This exercise is for a Zoologist to count the number of animal species that satisfy two conditions:
 * their weight is greater than a given weight limit OR their age is greater than a given age limit.
 *
 * @param animals a list of dictionaries, where each dictionary represents an animal with keys 'name', 'weight', 'age'.
 * @param weightLimit a float, the weight limit to consider.
 * @param ageLimit an int, the age limit to consider.
 * @return An integer representing the count of animal species that satisfy either weight or age conditions.
 */
fun countSpecies(animals: List<Map<String, Any>>, weightLimit: Float, ageLimit: Int): Int {
/**
 * This exercise is for a Zoologist to count the number of animal species that satisfy two conditions:
 * their weight is greater than a given weight limit OR their age is greater than a given age limit.
 *
 * @param animals a list of dictionaries, where each dictionary represents an animal with keys 'name', 'weight', 'age'.
 * @param weightLimit a float, the weight limit to consider.
 * @param ageLimit an int, the age limit to consider.
 * @return An integer representing the count of animal species that satisfy either weight or age conditions.
 */
fun countSpecies(animals: List<Map<String, Any>>, weightLimit: Float, ageLimit: Int): Int {

    var count = 0

    for (animal in animals) {
        if (animal["weight"] as Float > weightLimit || animal["age"] as Int > ageLimit) {
            count++
        }
    }

    return count
}