/**
 * This function takes a list of animals and returns the total population of all animals.
 *
 * @param animalList A list of dictionaries, each representing an animal with 'name' and 'population' keys.
 * @return The total population of all animals.
 */
fun findTotalPopulation(animalList: List<Map<String, Int>>): Int {

    var totalPopulation = 0
    
    for (animal in animalList) {
        totalPopulation += animal["population"] ?: 0
    }
    
    return totalPopulation
}

// Zoologist will use the functions
/**
 * This function takes a list of animals and returns the total population of all animals.
 *
 * @param animalList A list of dictionaries, each representing an animal with 'name' and 'population' keys.
 * @return The total population of all animals.
 */
fun findTotalPopulation(animalList: List<Map<String, Int>>): Int {
/**
 * This function takes a list of animals and returns the total population of all animals.
 *
 * @param animalList A list of dictionaries, each representing an animal with 'name' and 'population' keys.
 * @return The total population of all animals.
 */
fun findTotalPopulation(animalList: List<Map<String, Int>>): Int {

    var totalPopulation = 0
    
    for (animal in animalList) {
        totalPopulation += animal["population"] ?: 0
    }
    
    return totalPopulation
}

// Zoologist will use the functions