/**
 * You are a lawyer and need to calculate the total bill for a client.
 * Given a list of items and their corresponding prices, use a for loop
 * and combine it with other functions to calculate the total bill.
 *
 * @param items A map mapping items to their quantities.
 * @param prices A map mapping items to their prices.
 * @return The total bill amount.
 */
fun calculateBill(items: Map<String, Int>, prices: Map<String, Double>): Double {

    var totalBill = 0.0  // Initialize the total bill amount

    // Iterate through each item and its quantity using a for loop
    for ((item, quantity) in items) {
        // Calculate the total cost for the specific item
        val itemCost = prices.getOrDefault(item, 0.0) * quantity

        // Add the item cost to the total bill
        totalBill += itemCost
    }

    return totalBill
}
/**
 * You are a lawyer and need to calculate the total bill for a client.
 * Given a list of items and their corresponding prices, use a for loop
 * and combine it with other functions to calculate the total bill.
 *
 * @param items A map mapping items to their quantities.
 * @param prices A map mapping items to their prices.
 * @return The total bill amount.
 */
fun calculateBill(items: Map<String, Int>, prices: Map<String, Double>): Double {
/**
 * You are a lawyer and need to calculate the total bill for a client.
 * Given a list of items and their corresponding prices, use a for loop
 * and combine it with other functions to calculate the total bill.
 *
 * @param items A map mapping items to their quantities.
 * @param prices A map mapping items to their prices.
 * @return The total bill amount.
 */
fun calculateBill(items: Map<String, Int>, prices: Map<String, Double>): Double {

    var totalBill = 0.0  // Initialize the total bill amount

    // Iterate through each item and its quantity using a for loop
    for ((item, quantity) in items) {
        // Calculate the total cost for the specific item
        val itemCost = prices.getOrDefault(item, 0.0) * quantity

        // Add the item cost to the total bill
        totalBill += itemCost
    }

    return totalBill
}