/**
 * A fashion designer wants to calculate the total bill for a customer.
 * The designer provides discounts based on the total amount spent.
 * The discount ranges from 10% to 50% based on the amount spent.
 * Given the totalDiscount and amountSpent, complete the code to calculate the total bill.
 *
 * @param totalDiscount A decimal number representing the total discount to be applied.
 * @param amountSpent The total amount spent by the customer.
 * @return The total bill after applying the discount.
 */
fun calculateTotalBill(totalDiscount: Double, amountSpent: Double): Double {

    val discountAmount = amountSpent * totalDiscount  // Calculate the discount amount
    val totalBill = amountSpent - discountAmount  // Calculate the total bill after discount
    return totalBill
}
/**
 * A fashion designer wants to calculate the total bill for a customer.
 * The designer provides discounts based on the total amount spent.
 * The discount ranges from 10% to 50% based on the amount spent.
 * Given the totalDiscount and amountSpent, complete the code to calculate the total bill.
 *
 * @param totalDiscount A decimal number representing the total discount to be applied.
 * @param amountSpent The total amount spent by the customer.
 * @return The total bill after applying the discount.
 */
fun calculateTotalBill(totalDiscount: Double, amountSpent: Double): Double {
/**
 * A fashion designer wants to calculate the total bill for a customer.
 * The designer provides discounts based on the total amount spent.
 * The discount ranges from 10% to 50% based on the amount spent.
 * Given the totalDiscount and amountSpent, complete the code to calculate the total bill.
 *
 * @param totalDiscount A decimal number representing the total discount to be applied.
 * @param amountSpent The total amount spent by the customer.
 * @return The total bill after applying the discount.
 */
fun calculateTotalBill(totalDiscount: Double, amountSpent: Double): Double {

    val discountAmount = amountSpent * totalDiscount  // Calculate the discount amount
    val totalBill = amountSpent - discountAmount  // Calculate the total bill after discount
    return totalBill
}