/**
 * Given a list and a number, appends all the elements from the list
 * that are less than the given number to a new list.
 *
 * @param lst A list of numbers.
 * @param num The number to compare against.
 * @return A new list containing all the elements less than the given number.
 */
fun appendLessThan(lst: List<Int>, num: Int): List<Int> {

    // Initialize an empty list to store the elements less than num
    val result = mutableListOf<Int>()

    // Loop through each element in the list
    for (element in lst) {
        // Check if the element is less than num
        if (element < num) {
            // If true, append the element to the result list
            result.add(element)
        }
    }

    // Return the result list
    return result
}
/**
 * Given a list and a number, appends all the elements from the list
 * that are less than the given number to a new list.
 *
 * @param lst A list of numbers.
 * @param num The number to compare against.
 * @return A new list containing all the elements less than the given number.
 */
fun appendLessThan(lst: List<Int>, num: Int): List<Int> {
/**
 * Given a list and a number, appends all the elements from the list
 * that are less than the given number to a new list.
 *
 * @param lst A list of numbers.
 * @param num The number to compare against.
 * @return A new list containing all the elements less than the given number.
 */
fun appendLessThan(lst: List<Int>, num: Int): List<Int> {

    // Initialize an empty list to store the elements less than num
    val result = mutableListOf<Int>()

    // Loop through each element in the list
    for (element in lst) {
        // Check if the element is less than num
        if (element < num) {
            // If true, append the element to the result list
            result.add(element)
        }
    }

    // Return the result list
    return result
}