/**
 * This exercise is aimed at helping a journalist check the articles in a given category.
 * You are given a list of articles and a category.
 * Your task is to write a function that returns a new list containing only the articles that belong to the given category.
 *
 * @param articles A list of articles (strings)
 * @param category A string representing the category to filter the articles
 * @return A new list with only the articles that belong to the given category
 *
 * Example:
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Tech") -> ["Tech Innovation"]
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Health") -> ["Health Tips"]
 */
fun checkArticles(articles: List<String>, category: String): List<String> {

    val filteredArticles = articles.filter { it.contains(category) }
    return filteredArticles
}
/**
 * This exercise is aimed at helping a journalist check the articles in a given category.
 * You are given a list of articles and a category.
 * Your task is to write a function that returns a new list containing only the articles that belong to the given category.
 *
 * @param articles A list of articles (strings)
 * @param category A string representing the category to filter the articles
 * @return A new list with only the articles that belong to the given category
 *
 * Example:
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Tech") -> ["Tech Innovation"]
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Health") -> ["Health Tips"]
 */
fun checkArticles(articles: List<String>, category: String): List<String> {
/**
 * This exercise is aimed at helping a journalist check the articles in a given category.
 * You are given a list of articles and a category.
 * Your task is to write a function that returns a new list containing only the articles that belong to the given category.
 *
 * @param articles A list of articles (strings)
 * @param category A string representing the category to filter the articles
 * @return A new list with only the articles that belong to the given category
 *
 * Example:
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Tech") -> ["Tech Innovation"]
 * checkArticles(listOf("Tech Innovation", "Politics Today", "Sports Update", "Health Tips"), "Health") -> ["Health Tips"]
 */
fun checkArticles(articles: List<String>, category: String): List<String> {

    val filteredArticles = articles.filter { it.contains(category) }
    return filteredArticles
}