Help with Sal's shipping exercise

Hi There,

Every time i run this code to fulfill task #6([link]((https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-control-flow/projects/sals-shipping) , two return statements are printed;

the value i want to return(Ground shipping, premium shipping, drone shipping) plus none, why does it return none?

premium_shipping = 125
def ground_shipping(weight):
if (weight <= 2):
return 1.50 *weight + 20
elif (weight > 2 and weight <=6):
return 3.00 *weight + 20
elif (weight > 6 and weight <=10):
return 4.00 *weight + 20
else:
return 4.75 *weight + 20

def drone_shipping(weight):
if (weight <= 2):
return 4.50 *weight
elif (weight > 2 and weight <=6):
return 9.00 *weight
elif (weight > 6 and weight <=10):
return 12.00 *weight
else:
return 14.75 *weight

def best_shipping_method(weight):

if (ground_shipping(weight) < premium_shipping) and (ground_shipping(weight) <drone_shipping(weight)):
return print(“Ground Shipping”)
elif (premium_shipping <ground_shipping(weight))and (premium_shipping< drone_shipping(weight)):
return print(“Premium Shipping”)
elif (drone_shipping(weight)<ground_shipping(weight)) and (drone_shipping(weight)<premium_shipping):
return print(“Drone shipping”)

print(best_shipping_method(4.8))

I saw another post, i have return and print, where as return places none

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.