Complete the code to apply a fixed discount to the original price.
final_price = original_price - [1]The fixed discount amount should be subtracted from the original price to get the final price.
Complete the code to calculate the discount amount from a percentage rate.
discount_amount = original_price * [1]The discount amount is calculated by multiplying the original price by the discount rate (percentage as a decimal).
Fix the error in the code to apply a coupon discount only if the coupon is valid.
if coupon.is_valid(): final_price = original_price - [1]
Use the discount amount associated with the coupon object to subtract from the original price.
Fill both blanks to calculate the final price after applying a percentage discount and adding tax.
discount_amount = original_price * [1] final_price = (original_price - discount_amount) * (1 + [2])
First calculate discount_amount using discount_rate, then add tax by multiplying with (1 + tax_rate).
Fill all three blanks to create a dictionary of coupons with their discount rates, filtering only those above 10%.
coupons = {code: [1] for code, [2] in all_coupons.items() if [3] > 0.1}Use discount_rate as the value, iterate over code and discount_rate, and filter where discount_rate is greater than 10%.