Shipping fee rules
Easyif elif elsedefault arguments· 10 XP
The checkout page works out shipping with these rules:
- Members never pay shipping.
- Otherwise, orders of 50 or more ship free.
- Orders from 25 up to (not including) 50 pay 4.99.
- Smaller orders pay 7.99.
Write a function shipping_fee(total, member=False) that returns the fee using the rules above.
How it's checked
Your code runs, then the check below runs and its printed output is compared with ours.
shipping_fee(30)returns4.99, andshipping_fee(30, member=True)returns0
Hints, the later questions and the answer come with Pro.
def shipping_fee(total, member=False):
...