/**
 * Given the slope angle and soil conditions, this function checks if a slope is stable or not.
 * The slope angle is measured in degrees and the soil conditions can be "cohesive" or "non-cohesive".
 *
 * Returns:
 * - True if the slope is stable.
 * - False if the slope is not stable.
 *
 * Note:
 * - For cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 45 degrees.
 * - For non-cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 30 degrees.
 */
fun checkStability(slopeAngle: Int, soilConditions: String): Boolean {

    return when (soilConditions) {
        "cohesive" -> slopeAngle <= 45
        "non-cohesive" -> slopeAngle <= 30
        else -> false
    }
}
/**
 * Given the slope angle and soil conditions, this function checks if a slope is stable or not.
 * The slope angle is measured in degrees and the soil conditions can be "cohesive" or "non-cohesive".
 *
 * Returns:
 * - True if the slope is stable.
 * - False if the slope is not stable.
 *
 * Note:
 * - For cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 45 degrees.
 * - For non-cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 30 degrees.
 */
fun checkStability(slopeAngle: Int, soilConditions: String): Boolean {
/**
 * Given the slope angle and soil conditions, this function checks if a slope is stable or not.
 * The slope angle is measured in degrees and the soil conditions can be "cohesive" or "non-cohesive".
 *
 * Returns:
 * - True if the slope is stable.
 * - False if the slope is not stable.
 *
 * Note:
 * - For cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 45 degrees.
 * - For non-cohesive soil conditions, a slope is considered stable if the slope angle is less than or equal to 30 degrees.
 */
fun checkStability(slopeAngle: Int, soilConditions: String): Boolean {

    return when (soilConditions) {
        "cohesive" -> slopeAngle <= 45
        "non-cohesive" -> slopeAngle <= 30
        else -> false
    }
}