/**
 * Given a list of item prices and a discount percentage, calculate the total price after applying the discount.
 *
 * @param items A list of item prices.
 * @param discount The discount percentage.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(items: List<Double>, discount: Double): Double {

    var totalPrice = 0.0
    for (item in items) {
        totalPrice += item
    }
    
    totalPrice *= 1 - discount
    
    return totalPrice
}
/**
 * Given a list of item prices and a discount percentage, calculate the total price after applying the discount.
 *
 * @param items A list of item prices.
 * @param discount The discount percentage.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(items: List<Double>, discount: Double): Double {
/**
 * Given a list of item prices and a discount percentage, calculate the total price after applying the discount.
 *
 * @param items A list of item prices.
 * @param discount The discount percentage.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(items: List<Double>, discount: Double): Double {

    var totalPrice = 0.0
    for (item in items) {
        totalPrice += item
    }
    
    totalPrice *= 1 - discount
    
    return totalPrice
}