/**
 * This function calculates the total project cost considering the control flow within nested loops
 * and creating a list.
 *
 * @param projectFund The allocated fund for the project.
 * @param costEstimation A nested list containing the estimated cost for each sub-task in the project.
 * @return The total project cost.
 */
fun calculateTotalProjectCost(projectFund: Float, costEstimation: List<List<Float>>): Float {

    var totalCost = 0f  // Initializing the total cost variable

    for (task in costEstimation) {  // Iterating through each task in the cost estimation
        var taskCost = 0f  // Initializing the task cost variable for each task

        for (subTask in task) {  // Iterating through each sub-task within the current task
            var subTaskCost = 0f  // Initializing the sub-task cost variable for each sub-task

            // INSERT CODE HERE - Prompt the Civil Engineer to complete the code by calculating the sub-task cost

            taskCost += subTaskCost  // Adding the sub-task cost to the task cost
        }

        totalCost += taskCost  // Adding the task cost to the total cost
    }

    return totalCost
}
/**
 * This function calculates the total project cost considering the control flow within nested loops
 * and creating a list.
 *
 * @param projectFund The allocated fund for the project.
 * @param costEstimation A nested list containing the estimated cost for each sub-task in the project.
 * @return The total project cost.
 */
fun calculateTotalProjectCost(projectFund: Float, costEstimation: List<List<Float>>): Float {
/**
 * This function calculates the total project cost considering the control flow within nested loops
 * and creating a list.
 *
 * @param projectFund The allocated fund for the project.
 * @param costEstimation A nested list containing the estimated cost for each sub-task in the project.
 * @return The total project cost.
 */
fun calculateTotalProjectCost(projectFund: Float, costEstimation: List<List<Float>>): Float {

    var totalCost = 0f  // Initializing the total cost variable

    for (task in costEstimation) {  // Iterating through each task in the cost estimation
        var taskCost = 0f  // Initializing the task cost variable for each task

        for (subTask in task) {  // Iterating through each sub-task within the current task
            var subTaskCost = 0f  // Initializing the sub-task cost variable for each sub-task

            // INSERT CODE HERE - Prompt the Civil Engineer to complete the code by calculating the sub-task cost

            taskCost += subTaskCost  // Adding the sub-task cost to the task cost
        }

        totalCost += taskCost  // Adding the task cost to the total cost
    }

    return totalCost
}