Loading the task…
In an online store, the final cart total depends on item prices, quantities, and a shared discount. Given a list items, where each item contains price and qty, and a discount percentage discount, calculate the total cost. Apply the discount and return the result rounded to two decimal places.
[[100, 2], [50, 1]], 0250[[100, 1]], 1090[], 500def cart_total(items: list, discount: int) -> float:
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.