/**
 * Calculate the total cost of materials for an interior design project.
 *
 * The function takes a map of materials as input, where the keys are the names
 * of the materials and the values are their costs (in dollars).
 *
 * The function should iterate over each material in the map and skip the ones that are
 * marked as "not available". It should sum the costs of the available materials and return the
 * total cost.
 *
 * @param materials Map<String, Any> Dictionary of materials and their costs
 * @return Double Total cost of the available materials
 */
fun calculateTotalCost(materials: Map<String, Any>): Double {

    var totalCost = 0.0

    for ((material, cost) in materials) {
        if (cost == "not available") {
            continue
        }
        totalCost += cost.toString().toDouble()
    }

    return totalCost
}
/**
 * Calculate the total cost of materials for an interior design project.
 *
 * The function takes a map of materials as input, where the keys are the names
 * of the materials and the values are their costs (in dollars).
 *
 * The function should iterate over each material in the map and skip the ones that are
 * marked as "not available". It should sum the costs of the available materials and return the
 * total cost.
 *
 * @param materials Map<String, Any> Dictionary of materials and their costs
 * @return Double Total cost of the available materials
 */
fun calculateTotalCost(materials: Map<String, Any>): Double {
/**
 * Calculate the total cost of materials for an interior design project.
 *
 * The function takes a map of materials as input, where the keys are the names
 * of the materials and the values are their costs (in dollars).
 *
 * The function should iterate over each material in the map and skip the ones that are
 * marked as "not available". It should sum the costs of the available materials and return the
 * total cost.
 *
 * @param materials Map<String, Any> Dictionary of materials and their costs
 * @return Double Total cost of the available materials
 */
fun calculateTotalCost(materials: Map<String, Any>): Double {

    var totalCost = 0.0

    for ((material, cost) in materials) {
        if (cost == "not available") {
            continue
        }
        totalCost += cost.toString().toDouble()
    }

    return totalCost
}