/**
 * A carpenter is in need of calculating the total cost for a project.
 * The materials list contains the cost of each item required, while
 * labor represents the number of hours worked by the carpenter.
 * The function should return the total cost, taking into account the
 * cost of materials and the carpenter's hourly rate of $30.
 *
 * @param materials A list of integers representing the cost of materials.
 * @param labor The number of hours worked by the carpenter.
 * @return The total cost of the project.
 */
fun calculateTotalCost(materials: List<Int>, labor: Int): Float {

    // Calculate the total cost of materials
    val totalMaterialsCost = materials.sum()

    // Calculate the total cost including materials and labor
    val totalCost = totalMaterialsCost + (labor * 30)

    return totalCost.toFloat()
}
/**
 * A carpenter is in need of calculating the total cost for a project.
 * The materials list contains the cost of each item required, while
 * labor represents the number of hours worked by the carpenter.
 * The function should return the total cost, taking into account the
 * cost of materials and the carpenter's hourly rate of $30.
 *
 * @param materials A list of integers representing the cost of materials.
 * @param labor The number of hours worked by the carpenter.
 * @return The total cost of the project.
 */
fun calculateTotalCost(materials: List<Int>, labor: Int): Float {
/**
 * A carpenter is in need of calculating the total cost for a project.
 * The materials list contains the cost of each item required, while
 * labor represents the number of hours worked by the carpenter.
 * The function should return the total cost, taking into account the
 * cost of materials and the carpenter's hourly rate of $30.
 *
 * @param materials A list of integers representing the cost of materials.
 * @param labor The number of hours worked by the carpenter.
 * @return The total cost of the project.
 */
fun calculateTotalCost(materials: List<Int>, labor: Int): Float {

    // Calculate the total cost of materials
    val totalMaterialsCost = materials.sum()

    // Calculate the total cost including materials and labor
    val totalCost = totalMaterialsCost + (labor * 30)

    return totalCost.toFloat()
}