/**
 * This exercise tests your understanding of comparison with other values and appending elements to a list.
 *
 * Your task is to compare each element in the anthropologistList with the comparisonValue and append the element to a new list only if it is greater than or equal to the comparisonValue. Finally, you need to return the new list.
 *
 * Example:
 * For anthropologistList = [5, 10, 15, 20, 25] and comparisonValue = 10, the output should be [10, 15, 20, 25].
 *
 * Good luck!
 */
fun compareAndAppend(anthropologistList: List<Int>, comparisonValue: Int): List<Int> {

    val newList = mutableListOf<Int>()  // Create an empty list to store the elements greater than or equal to comparisonValue

    // Iterate over each element in the anthropologistList
    for (element in anthropologistList) {
        if (element >= comparisonValue) {
            newList.add(element)  // Append the element to the newList if it's greater than or equal to comparisonValue
        }
    }

    return newList
}
/**
 * This exercise tests your understanding of comparison with other values and appending elements to a list.
 *
 * Your task is to compare each element in the anthropologistList with the comparisonValue and append the element to a new list only if it is greater than or equal to the comparisonValue. Finally, you need to return the new list.
 *
 * Example:
 * For anthropologistList = [5, 10, 15, 20, 25] and comparisonValue = 10, the output should be [10, 15, 20, 25].
 *
 * Good luck!
 */
fun compareAndAppend(anthropologistList: List<Int>, comparisonValue: Int): List<Int> {
/**
 * This exercise tests your understanding of comparison with other values and appending elements to a list.
 *
 * Your task is to compare each element in the anthropologistList with the comparisonValue and append the element to a new list only if it is greater than or equal to the comparisonValue. Finally, you need to return the new list.
 *
 * Example:
 * For anthropologistList = [5, 10, 15, 20, 25] and comparisonValue = 10, the output should be [10, 15, 20, 25].
 *
 * Good luck!
 */
fun compareAndAppend(anthropologistList: List<Int>, comparisonValue: Int): List<Int> {

    val newList = mutableListOf<Int>()  // Create an empty list to store the elements greater than or equal to comparisonValue

    // Iterate over each element in the anthropologistList
    for (element in anthropologistList) {
        if (element >= comparisonValue) {
            newList.add(element)  // Append the element to the newList if it's greater than or equal to comparisonValue
        }
    }

    return newList
}