/**
 * This exercise requires modifying elements in a list based on a given category using when expression.
 * The list represents the carpentry items and the category represents the type of modification to be performed on the items.
 *
 * @param carpentryItems List<String> List of carpentry items to modify
 * @param category String The category of modification to be performed
 * @return List<String> List of modified carpentry items
 */
fun modifyList(carpentryItems: List<String>, category: String): List<String> {

    val modifiedItems = mutableListOf<String>()

    for (item in carpentryItems) {
        val modifiedItem = when (category) {
            "Cut" -> "Cutting $item"
            "Nail" -> "Nailing $item"
            "Paint" -> "Painting $item"
            else -> "Unknown $item"
        }

        modifiedItems.add(modifiedItem)
    }

    return modifiedItems
}
/**
 * This exercise requires modifying elements in a list based on a given category using when expression.
 * The list represents the carpentry items and the category represents the type of modification to be performed on the items.
 *
 * @param carpentryItems List<String> List of carpentry items to modify
 * @param category String The category of modification to be performed
 * @return List<String> List of modified carpentry items
 */
fun modifyList(carpentryItems: List<String>, category: String): List<String> {
/**
 * This exercise requires modifying elements in a list based on a given category using when expression.
 * The list represents the carpentry items and the category represents the type of modification to be performed on the items.
 *
 * @param carpentryItems List<String> List of carpentry items to modify
 * @param category String The category of modification to be performed
 * @return List<String> List of modified carpentry items
 */
fun modifyList(carpentryItems: List<String>, category: String): List<String> {

    val modifiedItems = mutableListOf<String>()

    for (item in carpentryItems) {
        val modifiedItem = when (category) {
            "Cut" -> "Cutting $item"
            "Nail" -> "Nailing $item"
            "Paint" -> "Painting $item"
            else -> "Unknown $item"
        }

        modifiedItems.add(modifiedItem)
    }

    return modifiedItems
}