/**
 * This exercise aims to help an Environmental Scientist understand list methods and how to apply the modulus operator.
 * Given a list of data values, the function below returns a new list that only contains the values that are divisible by a given number (divisor).
 *
 * @param dataValues A list of numeric data values.
 * @param divisor The number by which to filter the dataValues.
 * @return A list of values from dataValues that are divisible by the divisor.
 */
fun findFilteredValues(dataValues: List<Int>, divisor: Int): List<Int> {

    val filteredValues = mutableListOf<Int>()  // Initialize an empty list to store the filtered values

    for (value in dataValues) {
        if (value % divisor == 0) {
            filteredValues.add(value)  // Add the value to the filteredValues list if it is divisible by the divisor
        }
    }

    return filteredValues
}

// Example usage
/**
 * This exercise aims to help an Environmental Scientist understand list methods and how to apply the modulus operator.
 * Given a list of data values, the function below returns a new list that only contains the values that are divisible by a given number (divisor).
 *
 * @param dataValues A list of numeric data values.
 * @param divisor The number by which to filter the dataValues.
 * @return A list of values from dataValues that are divisible by the divisor.
 */
fun findFilteredValues(dataValues: List<Int>, divisor: Int): List<Int> {
/**
 * This exercise aims to help an Environmental Scientist understand list methods and how to apply the modulus operator.
 * Given a list of data values, the function below returns a new list that only contains the values that are divisible by a given number (divisor).
 *
 * @param dataValues A list of numeric data values.
 * @param divisor The number by which to filter the dataValues.
 * @return A list of values from dataValues that are divisible by the divisor.
 */
fun findFilteredValues(dataValues: List<Int>, divisor: Int): List<Int> {

    val filteredValues = mutableListOf<Int>()  // Initialize an empty list to store the filtered values

    for (value in dataValues) {
        if (value % divisor == 0) {
            filteredValues.add(value)  // Add the value to the filteredValues list if it is divisible by the divisor
        }
    }

    return filteredValues
}

// Example usage