/**
 * Calculate the total cost of all materials.
 *
 * @param materials A list of materials with prices
 * @return The total cost of all materials
 */
fun calculateTotalCost(materials: List<Pair<String, Float>>): Float {

    // Calculate total cost using sumBy
    val totalCost = materials.sumByDouble { it.second.toDouble() }.toFloat()
    
    return totalCost
}
/**
 * Calculate the total cost of all materials.
 *
 * @param materials A list of materials with prices
 * @return The total cost of all materials
 */
fun calculateTotalCost(materials: List<Pair<String, Float>>): Float {
/**
 * Calculate the total cost of all materials.
 *
 * @param materials A list of materials with prices
 * @return The total cost of all materials
 */
fun calculateTotalCost(materials: List<Pair<String, Float>>): Float {

    // Calculate total cost using sumBy
    val totalCost = materials.sumByDouble { it.second.toDouble() }.toFloat()
    
    return totalCost
}