/**
 * This function takes in a rock and determines its type based on its properties.
 * The rock can be sedimentary, igneous, or metamorphic.
 * The function uses nested ternary operators and if-else statements to make the determination.
 */
fun checkRockType(rock: Map<String, Boolean>): String {

    var rockType = ""

    // Check if the rock is sedimentary, igneous, or metamorphic
    rockType = if (rock["strata"] == true && rock["fossils"] == true && rock["layers"] == true) {
        "sedimentary"
    } else if (rock["volcanic"] == true && rock["crystals"] == true) {
        "igneous"
    } else if (rock["heat"] == true && rock["pressure"] == true) {
        "metamorphic"
    } else {
        "unknown"
    }

    return rockType
}
/**
 * This function takes in a rock and determines its type based on its properties.
 * The rock can be sedimentary, igneous, or metamorphic.
 * The function uses nested ternary operators and if-else statements to make the determination.
 */
fun checkRockType(rock: Map<String, Boolean>): String {
/**
 * This function takes in a rock and determines its type based on its properties.
 * The rock can be sedimentary, igneous, or metamorphic.
 * The function uses nested ternary operators and if-else statements to make the determination.
 */
fun checkRockType(rock: Map<String, Boolean>): String {

    var rockType = ""

    // Check if the rock is sedimentary, igneous, or metamorphic
    rockType = if (rock["strata"] == true && rock["fossils"] == true && rock["layers"] == true) {
        "sedimentary"
    } else if (rock["volcanic"] == true && rock["crystals"] == true) {
        "igneous"
    } else if (rock["heat"] == true && rock["pressure"] == true) {
        "metamorphic"
    } else {
        "unknown"
    }

    return rockType
}