Question: Implement a function called (calculate_shipping) that takes one argument, the weight of a package to be shipped. It returns the price for shipping the package,
Implement a function called (calculate_shipping) that takes one argument, the weight of a package to be shipped. It returns the price for shipping the package, calculated as follows: For anything under 2 pounds, the rate is $2.00. For packages of 2 pounds but under 10 pounds, the rate is $5.00. For packages of 10 pounds or more, the rate is $5.00 plus $1.50 per pound for each pound over 10. (python)
assert calculate_shipping(1.5) == 2.00 assert calculate_shipping(7) == 5.00 assert calculate_shipping(15) == 12.50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
