/**
 * As an archaeologist, you have discovered a series of ancient artifacts with numerical values engraved on them.
 * Your mission is to create a function that takes in a starting value and a stopping value, and returns a range of numbers
 * between those two values (inclusive).
 *
 * Write a Kotlin function called createRange that takes two arguments:
 * - start: an integer representing the start value of the range.
 * - stop: an integer representing the stop value of the range.
 *
 * Your function should return a list of all the numbers in the range from start to stop (inclusive).
 *
 * Example:
 * createRange(5, 12) -> [5, 6, 7, 8, 9, 10, 11, 12]
 *
 * Hint: You may use the IntRange class in your solution.
 */
fun createRange(start: Int, stop: Int): List<Int> {

    if (start > stop) {
        return listOf(-1) // Invalid range. Start value should be less than or equal to the stop value.
    }

    // Initialize an empty list to store the numbers in the range
    val result = mutableListOf<Int>()

    // Iterate through the range of numbers from start to stop (inclusive)
    for (num in start..stop) {
        result.add(num)
    }

    return result
}
/**
 * As an archaeologist, you have discovered a series of ancient artifacts with numerical values engraved on them.
 * Your mission is to create a function that takes in a starting value and a stopping value, and returns a range of numbers
 * between those two values (inclusive).
 *
 * Write a Kotlin function called createRange that takes two arguments:
 * - start: an integer representing the start value of the range.
 * - stop: an integer representing the stop value of the range.
 *
 * Your function should return a list of all the numbers in the range from start to stop (inclusive).
 *
 * Example:
 * createRange(5, 12) -> [5, 6, 7, 8, 9, 10, 11, 12]
 *
 * Hint: You may use the IntRange class in your solution.
 */
fun createRange(start: Int, stop: Int): List<Int> {
/**
 * As an archaeologist, you have discovered a series of ancient artifacts with numerical values engraved on them.
 * Your mission is to create a function that takes in a starting value and a stopping value, and returns a range of numbers
 * between those two values (inclusive).
 *
 * Write a Kotlin function called createRange that takes two arguments:
 * - start: an integer representing the start value of the range.
 * - stop: an integer representing the stop value of the range.
 *
 * Your function should return a list of all the numbers in the range from start to stop (inclusive).
 *
 * Example:
 * createRange(5, 12) -> [5, 6, 7, 8, 9, 10, 11, 12]
 *
 * Hint: You may use the IntRange class in your solution.
 */
fun createRange(start: Int, stop: Int): List<Int> {

    if (start > stop) {
        return listOf(-1) // Invalid range. Start value should be less than or equal to the stop value.
    }

    // Initialize an empty list to store the numbers in the range
    val result = mutableListOf<Int>()

    // Iterate through the range of numbers from start to stop (inclusive)
    for (num in start..stop) {
        result.add(num)
    }

    return result
}