/**
 * This exercise requires the carpenter to use the tuple() function to create a tuple containing a specified number of tools.
 * The carpenter is also required to use the is not operator to check if the number of tools in the tuple is not equal to zero.
 */
fun createTuple(carpenter: String, tools: List<String>, numOfTools: Int): String {

    // Check if the carpenter is provided with at least one tool
    if (numOfTools < 1) {
        return "Please specify a number of tools greater than zero."
    }

    // Create a tuple using the tuple() function
    val toolTuple = tools.toTypedArray()

    // Check if the number of tools in the tuple is not equal to zero
    if (toolTuple.isNotEmpty()) {
        return "$carpenter has successfully created a tuple with ${toolTuple.size} tools."
    } else {
        return "$carpenter has failed to create a tuple with tools."
    }
}
/**
 * This exercise requires the carpenter to use the tuple() function to create a tuple containing a specified number of tools.
 * The carpenter is also required to use the is not operator to check if the number of tools in the tuple is not equal to zero.
 */
fun createTuple(carpenter: String, tools: List<String>, numOfTools: Int): String {
/**
 * This exercise requires the carpenter to use the tuple() function to create a tuple containing a specified number of tools.
 * The carpenter is also required to use the is not operator to check if the number of tools in the tuple is not equal to zero.
 */
fun createTuple(carpenter: String, tools: List<String>, numOfTools: Int): String {

    // Check if the carpenter is provided with at least one tool
    if (numOfTools < 1) {
        return "Please specify a number of tools greater than zero."
    }

    // Create a tuple using the tuple() function
    val toolTuple = tools.toTypedArray()

    // Check if the number of tools in the tuple is not equal to zero
    if (toolTuple.isNotEmpty()) {
        return "$carpenter has successfully created a tuple with ${toolTuple.size} tools."
    } else {
        return "$carpenter has failed to create a tuple with tools."
    }
}