/**
 * Given a number n, create a range of numbers starting from 'start' and ending at 'stop'.
 * Append the range of numbers to a list.
 *
 * @param n An integer representing the range size.
 * @param start An integer representing the starting value of the range.
 * @param stop An integer representing the ending value of the range.
 * @return A list containing the range of numbers from 'start' to 'stop'.
 *
 * Example:
 * createRangeAndAppendElements(5, 2, 7)
 * Output: [2, 3, 4, 5, 6, 7]
 */
fun createRangeAndAppendElements(n: Int, start: Int, stop: Int): List<Int> {

    val result = mutableListOf<Int>()

    for (i in 0 until n) {
        result.add(start + i)
    }

    return result
}
/**
 * Given a number n, create a range of numbers starting from 'start' and ending at 'stop'.
 * Append the range of numbers to a list.
 *
 * @param n An integer representing the range size.
 * @param start An integer representing the starting value of the range.
 * @param stop An integer representing the ending value of the range.
 * @return A list containing the range of numbers from 'start' to 'stop'.
 *
 * Example:
 * createRangeAndAppendElements(5, 2, 7)
 * Output: [2, 3, 4, 5, 6, 7]
 */
fun createRangeAndAppendElements(n: Int, start: Int, stop: Int): List<Int> {
/**
 * Given a number n, create a range of numbers starting from 'start' and ending at 'stop'.
 * Append the range of numbers to a list.
 *
 * @param n An integer representing the range size.
 * @param start An integer representing the starting value of the range.
 * @param stop An integer representing the ending value of the range.
 * @return A list containing the range of numbers from 'start' to 'stop'.
 *
 * Example:
 * createRangeAndAppendElements(5, 2, 7)
 * Output: [2, 3, 4, 5, 6, 7]
 */
fun createRangeAndAppendElements(n: Int, start: Int, stop: Int): List<Int> {

    val result = mutableListOf<Int>()

    for (i in 0 until n) {
        result.add(start + i)
    }

    return result
}