/**
 * You are an interior designer working on a project to renovate a room. The room has a length and width, which are
 * provided as a dictionary with keys "length" and "width". Additionally, you have a dictionary called item_prices
 * containing the prices of different items you can use to decorate the room. Your task is to calculate the total cost
 * of decorating the room using the prices of the items and the dimensions of the room.
 *
 * @param roomDimensions A dictionary containing the length and width of the room.
 * @param itemPrices A dictionary containing the prices of different items.
 * @return The total cost of decorating the room.
 *
 * Note: The room dimensions can be fractional numbers, and item prices are assumed to be in USD.
 */
fun calculateCost(roomDimensions: Map<String, Double>, itemPrices: Map<String, Double>): Double {

    var totalCost = 0.0

    // Calculate the area of the room
    val roomArea = roomDimensions["length"]!! * roomDimensions["width"]!!

    // Iterate through item prices and calculate the cost
    for ((item, price) in itemPrices) {
        totalCost += roomArea * price
    }

    return totalCost
}
/**
 * You are an interior designer working on a project to renovate a room. The room has a length and width, which are
 * provided as a dictionary with keys "length" and "width". Additionally, you have a dictionary called item_prices
 * containing the prices of different items you can use to decorate the room. Your task is to calculate the total cost
 * of decorating the room using the prices of the items and the dimensions of the room.
 *
 * @param roomDimensions A dictionary containing the length and width of the room.
 * @param itemPrices A dictionary containing the prices of different items.
 * @return The total cost of decorating the room.
 *
 * Note: The room dimensions can be fractional numbers, and item prices are assumed to be in USD.
 */
fun calculateCost(roomDimensions: Map<String, Double>, itemPrices: Map<String, Double>): Double {
/**
 * You are an interior designer working on a project to renovate a room. The room has a length and width, which are
 * provided as a dictionary with keys "length" and "width". Additionally, you have a dictionary called item_prices
 * containing the prices of different items you can use to decorate the room. Your task is to calculate the total cost
 * of decorating the room using the prices of the items and the dimensions of the room.
 *
 * @param roomDimensions A dictionary containing the length and width of the room.
 * @param itemPrices A dictionary containing the prices of different items.
 * @return The total cost of decorating the room.
 *
 * Note: The room dimensions can be fractional numbers, and item prices are assumed to be in USD.
 */
fun calculateCost(roomDimensions: Map<String, Double>, itemPrices: Map<String, Double>): Double {

    var totalCost = 0.0

    // Calculate the area of the room
    val roomArea = roomDimensions["length"]!! * roomDimensions["width"]!!

    // Iterate through item prices and calculate the cost
    for ((item, price) in itemPrices) {
        totalCost += roomArea * price
    }

    return totalCost
}