Python The Hard Way exercise files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
378 B

def ground_shipping(weight):
flat = 20.00
if weight <= 2:
cost = flat + 1.50 * weight
if (weight > 2) and (weight <= 6):
cost = flat + weight * 3.00
if (weight > 6) and (weight <= 10):
cost = flat + weight * 4.00
if (weight > 10):
cost = flat + weight * 4.75
return cost
premium_ground_shipping = 125.00
print(premium_ground_shipping(8.4))