/**
 * A company wants to calculate the total revenue for a given inventory.
 * Each item in the inventory is represented as a dictionary containing the name, quantity, and price of the item.
 *
 * Complete the function calculateTotalRevenue to calculate the total revenue by multiplying the quantity of each item with its price.
 *
 * @param inventory A list of dictionaries representing the inventory items.
 * @return The total revenue calculated from the inventory.
 *
 * Example:
 * calculateTotalRevenue(listOf(mapOf("name" to "Widget", "quantity" to 10, "price" to 5.5), mapOf("name" to "Gadget", "quantity" to 5, "price" to 8.25)))
 * Output: 92.5
 */
fun calculateTotalRevenue(inventory: List<Map<String, Any>>): Double {

    var totalRevenue = 0.0
    for (item in inventory) {
        totalRevenue += item["quantity"] as Int * item["price"] as Double
    }
    return totalRevenue
}
/**
 * A company wants to calculate the total revenue for a given inventory.
 * Each item in the inventory is represented as a dictionary containing the name, quantity, and price of the item.
 *
 * Complete the function calculateTotalRevenue to calculate the total revenue by multiplying the quantity of each item with its price.
 *
 * @param inventory A list of dictionaries representing the inventory items.
 * @return The total revenue calculated from the inventory.
 *
 * Example:
 * calculateTotalRevenue(listOf(mapOf("name" to "Widget", "quantity" to 10, "price" to 5.5), mapOf("name" to "Gadget", "quantity" to 5, "price" to 8.25)))
 * Output: 92.5
 */
fun calculateTotalRevenue(inventory: List<Map<String, Any>>): Double {
/**
 * A company wants to calculate the total revenue for a given inventory.
 * Each item in the inventory is represented as a dictionary containing the name, quantity, and price of the item.
 *
 * Complete the function calculateTotalRevenue to calculate the total revenue by multiplying the quantity of each item with its price.
 *
 * @param inventory A list of dictionaries representing the inventory items.
 * @return The total revenue calculated from the inventory.
 *
 * Example:
 * calculateTotalRevenue(listOf(mapOf("name" to "Widget", "quantity" to 10, "price" to 5.5), mapOf("name" to "Gadget", "quantity" to 5, "price" to 8.25)))
 * Output: 92.5
 */
fun calculateTotalRevenue(inventory: List<Map<String, Any>>): Double {

    var totalRevenue = 0.0
    for (item in inventory) {
        totalRevenue += item["quantity"] as Int * item["price"] as Double
    }
    return totalRevenue
}