0 of 6 problems solved • 0%

Exercise prompt

Set a Delivery Fee

Two calls can use different policies if the policy values are parameters. Defaults provide ordinary values without hard-coding them in the function body.

Example

def passes(score, minimum=60): return score >= minimum print(passes(58)) # False print(passes(58, minimum=50)) # True

The cutoff is part of the call. Using it inside the comparison lets the same body work with both policies.

Your task

Define delivery_fee(total, threshold=50, fee=5). Return zero when the total reaches the threshold, otherwise return the fee. Accept overrides by keyword.