/**
 * Physical Therapy Exercise:
 *
 * Given a list of pain levels and a threshold, remove all elements from the list that are less than the threshold.
 *
 * @param painLevels A list containing pain level values.
 * @param threshold The threshold value to compare against each pain level.
 * @return The modified list after removing elements below the threshold.
 *
 * Example:
 * removeLessThanThreshold(listOf(7, 2, 5, 9, 3, 6), 5) -> [7, 5, 9, 6]
 */
fun removeLessThanThreshold(painLevels: List<Int>, threshold: Int): List<Int> {

    val result = mutableListOf<Int>()

    for (level in painLevels) {
        if (level >= threshold) {
            result.add(level)
        }
    }

    return result
}
/**
 * Physical Therapy Exercise:
 *
 * Given a list of pain levels and a threshold, remove all elements from the list that are less than the threshold.
 *
 * @param painLevels A list containing pain level values.
 * @param threshold The threshold value to compare against each pain level.
 * @return The modified list after removing elements below the threshold.
 *
 * Example:
 * removeLessThanThreshold(listOf(7, 2, 5, 9, 3, 6), 5) -> [7, 5, 9, 6]
 */
fun removeLessThanThreshold(painLevels: List<Int>, threshold: Int): List<Int> {
/**
 * Physical Therapy Exercise:
 *
 * Given a list of pain levels and a threshold, remove all elements from the list that are less than the threshold.
 *
 * @param painLevels A list containing pain level values.
 * @param threshold The threshold value to compare against each pain level.
 * @return The modified list after removing elements below the threshold.
 *
 * Example:
 * removeLessThanThreshold(listOf(7, 2, 5, 9, 3, 6), 5) -> [7, 5, 9, 6]
 */
fun removeLessThanThreshold(painLevels: List<Int>, threshold: Int): List<Int> {

    val result = mutableListOf<Int>()

    for (level in painLevels) {
        if (level >= threshold) {
            result.add(level)
        }
    }

    return result
}