/**
 * You are a farmer and you have a list of dictionaries representing the age of your cows.
 * Each dictionary contains the name of the cow as the key and the age of the cow as the value.
 * Complete the code to extract the ages of the cows and return a list of their ages.
 *
 * @param cowsData A list of dictionaries containing the cow names and ages.
 * @return A list of integers representing the ages of the cows.
 *
 * Example:
 * cowsData = listOf(mapOf("Bessie" to 5), mapOf("Daisy" to 3), mapOf("Maggie" to 7))
 * getCowsAge(cowsData) -> [5, 3, 7]
 */
fun getCowsAge(cowsData: List<Map<String, Int>>): List<Int> {

    return cowsData.flatMap { cowDict -> cowDict.values }
}
/**
 * You are a farmer and you have a list of dictionaries representing the age of your cows.
 * Each dictionary contains the name of the cow as the key and the age of the cow as the value.
 * Complete the code to extract the ages of the cows and return a list of their ages.
 *
 * @param cowsData A list of dictionaries containing the cow names and ages.
 * @return A list of integers representing the ages of the cows.
 *
 * Example:
 * cowsData = listOf(mapOf("Bessie" to 5), mapOf("Daisy" to 3), mapOf("Maggie" to 7))
 * getCowsAge(cowsData) -> [5, 3, 7]
 */
fun getCowsAge(cowsData: List<Map<String, Int>>): List<Int> {
/**
 * You are a farmer and you have a list of dictionaries representing the age of your cows.
 * Each dictionary contains the name of the cow as the key and the age of the cow as the value.
 * Complete the code to extract the ages of the cows and return a list of their ages.
 *
 * @param cowsData A list of dictionaries containing the cow names and ages.
 * @return A list of integers representing the ages of the cows.
 *
 * Example:
 * cowsData = listOf(mapOf("Bessie" to 5), mapOf("Daisy" to 3), mapOf("Maggie" to 7))
 * getCowsAge(cowsData) -> [5, 3, 7]
 */
fun getCowsAge(cowsData: List<Map<String, Int>>): List<Int> {

    return cowsData.flatMap { cowDict -> cowDict.values }
}