/**
 * This function receives a list of articles and returns a new list
 * containing only the articles that meet certain criteria.
 */
fun checkArticles(articles: List<Map<String, Any>>): List<Map<String, Any>> {

    // Initialize the final list
    val filteredArticles = mutableListOf<Map<String, Any>>()
    
    // Loop through the given articles
    for (article in articles) {
        
        // Check if the article has all the required information
        if (article["title"] == null || article["content"] == null || article["author"] == null) {
            // Skip to the next article if any required information is missing
            continue
        }
        
        // Check if the article contains specific keywords
        if (!article["content"].toString().contains("Python") || !article["content"].toString().contains("programming")) {
            // Skip to the next article if the keywords are not found
            continue
        }
        
        // Check if the article is authored by a journalist with more than 5 years of experience
        if ((article["author"] as Map<String, Any>)["years_of_experience"] as Int <= 5) {
            // Skip to the next article if the author doesn't meet the experience criteria
            continue
        }
        
        // Add the article to the filtered list
        filteredArticles.add(article)
    }
    
    return filteredArticles
}
/**
 * This function receives a list of articles and returns a new list
 * containing only the articles that meet certain criteria.
 */
fun checkArticles(articles: List<Map<String, Any>>): List<Map<String, Any>> {
/**
 * This function receives a list of articles and returns a new list
 * containing only the articles that meet certain criteria.
 */
fun checkArticles(articles: List<Map<String, Any>>): List<Map<String, Any>> {

    // Initialize the final list
    val filteredArticles = mutableListOf<Map<String, Any>>()
    
    // Loop through the given articles
    for (article in articles) {
        
        // Check if the article has all the required information
        if (article["title"] == null || article["content"] == null || article["author"] == null) {
            // Skip to the next article if any required information is missing
            continue
        }
        
        // Check if the article contains specific keywords
        if (!article["content"].toString().contains("Python") || !article["content"].toString().contains("programming")) {
            // Skip to the next article if the keywords are not found
            continue
        }
        
        // Check if the article is authored by a journalist with more than 5 years of experience
        if ((article["author"] as Map<String, Any>)["years_of_experience"] as Int <= 5) {
            // Skip to the next article if the author doesn't meet the experience criteria
            continue
        }
        
        // Add the article to the filtered list
        filteredArticles.add(article)
    }
    
    return filteredArticles
}