/**
 * You are a geologist working on a project and you need to create a list with initial elements.
 * You also need to access specific values from a dictionary to fill those initial elements.
 *
 * In order to complete this task, implement the function 'createListWithValues' below which takes a dictionary as input
 * and returns a new list with initial elements populated by specific values from the dictionary.
 *
 * @param dictionary A dictionary containing key-value pairs.
 * @return A new list with initial elements populated by specific values from the dictionary.
 *
 * Example:
 * val dictionary = mapOf("rock1" to 10, "rock2" to 20, "rock3" to 30)
 * createListWithValues(dictionary) => [10, 20, 30]
 */
fun createListWithValues(dictionary: Map<String, Int>): List<Int> {

    val initialElements = mutableListOf<Int>()

    if ("rock1" in dictionary) {
        initialElements.add(dictionary["rock1"]!!)
    }

    if ("rock2" in dictionary) {
        initialElements.add(dictionary["rock2"]!!)
    }

    if ("rock3" in dictionary) {
        initialElements.add(dictionary["rock3"]!!)
    }

    return initialElements
}
/**
 * You are a geologist working on a project and you need to create a list with initial elements.
 * You also need to access specific values from a dictionary to fill those initial elements.
 *
 * In order to complete this task, implement the function 'createListWithValues' below which takes a dictionary as input
 * and returns a new list with initial elements populated by specific values from the dictionary.
 *
 * @param dictionary A dictionary containing key-value pairs.
 * @return A new list with initial elements populated by specific values from the dictionary.
 *
 * Example:
 * val dictionary = mapOf("rock1" to 10, "rock2" to 20, "rock3" to 30)
 * createListWithValues(dictionary) => [10, 20, 30]
 */
fun createListWithValues(dictionary: Map<String, Int>): List<Int> {
/**
 * You are a geologist working on a project and you need to create a list with initial elements.
 * You also need to access specific values from a dictionary to fill those initial elements.
 *
 * In order to complete this task, implement the function 'createListWithValues' below which takes a dictionary as input
 * and returns a new list with initial elements populated by specific values from the dictionary.
 *
 * @param dictionary A dictionary containing key-value pairs.
 * @return A new list with initial elements populated by specific values from the dictionary.
 *
 * Example:
 * val dictionary = mapOf("rock1" to 10, "rock2" to 20, "rock3" to 30)
 * createListWithValues(dictionary) => [10, 20, 30]
 */
fun createListWithValues(dictionary: Map<String, Int>): List<Int> {

    val initialElements = mutableListOf<Int>()

    if ("rock1" in dictionary) {
        initialElements.add(dictionary["rock1"]!!)
    }

    if ("rock2" in dictionary) {
        initialElements.add(dictionary["rock2"]!!)
    }

    if ("rock3" in dictionary) {
        initialElements.add(dictionary["rock3"]!!)
    }

    return initialElements
}