I was wondering if some situations are not covered by the solution to which shipping method is cheapest.
We are required to use the following syntax:
ground = ground_shipping(weight) premium = premium_ground_shipping drone = drone_shipping(weight) if ground < premium and ground < drone: method = "Ground Shipping" cost = ground elif premium < ground and premium < drone: method = "Premium Ground Shipping" cost = premium else: method = "Drone Shipping" costs = drone
If any shipping methods are equal, would the arguements fall apart? I’m not sure if I have articulated that well but in the syntax, we only specified if one cost was < another cost, but what happens when one method is equal to another method.
Eg. what if ground_shipping = premium_ground_shipping < drone_shipping
Wouldn’t that return drone shipping as the preferred shipping method because it is covered by the ‘Else’ statement?
I’m sure that this specific scenario doesn’t occur or it might not even be possible to occur in this task but shouldn’t we try to cover all of our bases anyway?