apply_discount(price, strategy) where strategy is itself a function that takes a price and returns a discounted price. apply_discount should simply call strategy(price) and return the result, rounded to 2 decimal places.def ten_percent_off(p): return p * 0.9 apply_discount(200, ten_percent_off)
180.0
strategy(200) = 200 * 0.9 = 180.0.
Functions are values in Python — you can pass one as an ordinary argument.
Use round(value, 2) on the strategy result.