/**
 * This function calculates the total cost of electrical items.
 *
 * @param electricalItems List of electrical items required.
 * @param priceList Dictionary containing the prices of each item.
 * @return Total cost of all the electrical items.
 */
fun calculateCost(electricalItems: List<String>, priceList: Map<String, Float>): Float {

    var totalCost = 0f

    // Loop through the electricalItems list
    for (item in electricalItems) {
        if (item in priceList) {
            // Add the price of each item to the total cost
            totalCost += priceList[item] ?: 0f
        }
    }

    return totalCost
}
/**
 * This function calculates the total cost of electrical items.
 *
 * @param electricalItems List of electrical items required.
 * @param priceList Dictionary containing the prices of each item.
 * @return Total cost of all the electrical items.
 */
fun calculateCost(electricalItems: List<String>, priceList: Map<String, Float>): Float {
/**
 * This function calculates the total cost of electrical items.
 *
 * @param electricalItems List of electrical items required.
 * @param priceList Dictionary containing the prices of each item.
 * @return Total cost of all the electrical items.
 */
fun calculateCost(electricalItems: List<String>, priceList: Map<String, Float>): Float {

    var totalCost = 0f

    // Loop through the electricalItems list
    for (item in electricalItems) {
        if (item in priceList) {
            // Add the price of each item to the total cost
            totalCost += priceList[item] ?: 0f
        }
    }

    return totalCost
}