/**
 * This function assigns the appropriate jobs to a carpenter based on their skill set and the job requirements.
 *
 * @param carpenterSkills A list of skills possessed by the carpenter.
 * @param jobRequirements A list of skills required for the job.
 * @return A list of jobs that the carpenter can perform.
 */
fun assignJobs(carpenterSkills: List<String>, jobRequirements: List<String>): List<String> {

    // Initialize an empty list to store compatible jobs
    val compatibleJobs = mutableListOf<String>()

    // Loop through each job requirement
    for (requirement in jobRequirements) {
        // Check if the carpenter possesses the required skill
        if (carpenterSkills.contains(requirement)) {
            // Append the compatible job to the list
            compatibleJobs.add(requirement)
        }
    }

    return compatibleJobs
}
/**
 * This function assigns the appropriate jobs to a carpenter based on their skill set and the job requirements.
 *
 * @param carpenterSkills A list of skills possessed by the carpenter.
 * @param jobRequirements A list of skills required for the job.
 * @return A list of jobs that the carpenter can perform.
 */
fun assignJobs(carpenterSkills: List<String>, jobRequirements: List<String>): List<String> {
/**
 * This function assigns the appropriate jobs to a carpenter based on their skill set and the job requirements.
 *
 * @param carpenterSkills A list of skills possessed by the carpenter.
 * @param jobRequirements A list of skills required for the job.
 * @return A list of jobs that the carpenter can perform.
 */
fun assignJobs(carpenterSkills: List<String>, jobRequirements: List<String>): List<String> {

    // Initialize an empty list to store compatible jobs
    val compatibleJobs = mutableListOf<String>()

    // Loop through each job requirement
    for (requirement in jobRequirements) {
        // Check if the carpenter possesses the required skill
        if (carpenterSkills.contains(requirement)) {
            // Append the compatible job to the list
            compatibleJobs.add(requirement)
        }
    }

    return compatibleJobs
}