/**
 * A geologist needs to extract specific elements from a range of values.
 * Complete the function 'createSlicedRange' which takes in a start and stop value
 * and returns a sliced range between the given arguments.
 *
 * The function should return a list containing only the odd numbers from the sliced range,
 * sorted in descending order.
 *
 * Instructions:
 * - Use the built-in range function to create a range of numbers from 'start' to 'stop' (exclusive).
 * - Slice the range using a step of 2 to extract only odd numbers.
 * - Sort the sliced range in descending order.
 * - Return the sorted sliced range as a list.
 *
 * Example:
 * createSlicedRange(10, 30) => [29, 27, 25, 23, 21, 19, 17, 15, 13, 11]
 */
fun createSlicedRange(start: Int, stop: Int): List<Int> {

    val rangeList = (start until stop).toList()
    val slicedRange = rangeList.filter { it % 2 != 0 }.sortedDescending()
    return slicedRange
}
/**
 * A geologist needs to extract specific elements from a range of values.
 * Complete the function 'createSlicedRange' which takes in a start and stop value
 * and returns a sliced range between the given arguments.
 *
 * The function should return a list containing only the odd numbers from the sliced range,
 * sorted in descending order.
 *
 * Instructions:
 * - Use the built-in range function to create a range of numbers from 'start' to 'stop' (exclusive).
 * - Slice the range using a step of 2 to extract only odd numbers.
 * - Sort the sliced range in descending order.
 * - Return the sorted sliced range as a list.
 *
 * Example:
 * createSlicedRange(10, 30) => [29, 27, 25, 23, 21, 19, 17, 15, 13, 11]
 */
fun createSlicedRange(start: Int, stop: Int): List<Int> {
/**
 * A geologist needs to extract specific elements from a range of values.
 * Complete the function 'createSlicedRange' which takes in a start and stop value
 * and returns a sliced range between the given arguments.
 *
 * The function should return a list containing only the odd numbers from the sliced range,
 * sorted in descending order.
 *
 * Instructions:
 * - Use the built-in range function to create a range of numbers from 'start' to 'stop' (exclusive).
 * - Slice the range using a step of 2 to extract only odd numbers.
 * - Sort the sliced range in descending order.
 * - Return the sorted sliced range as a list.
 *
 * Example:
 * createSlicedRange(10, 30) => [29, 27, 25, 23, 21, 19, 17, 15, 13, 11]
 */
fun createSlicedRange(start: Int, stop: Int): List<Int> {

    val rangeList = (start until stop).toList()
    val slicedRange = rangeList.filter { it % 2 != 0 }.sortedDescending()
    return slicedRange
}