Https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-control-flow/projects/sals-shipping


#1

I have a problem can anyone help me as i am doing exercise Sal’s shipping and ii got stuck in it i pasted the code below and link to exercise can anyone solve my problem.

Code:

#sal's shipping code
Preformatted textdef ground_shipping(weight):
  if weight <= 2:
    price_per_pound = 1.50
  elif weight <= 6:
    price_per_pound = 3.00
  elif weight <= 10:
    price_per_pound = 4.00
  else:
    price_per_pound = 4.75
    
  return 20 + (price_per_pound * weight)
  
print(ground_shipping(8.4))

premium_ground_shipping = 125.00

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

print(drone_shipping(1.5))

#I got stuck here it shows none  when i run in terminal upper codes are correct please help me

def cheapest_shipping(weight):
  ground = ground_shipping(weight)
  premium = premium_ground_shipping
  drone = drone_shipping(weight)
  
  if ground < premium and ground < drone:
    best_option = "Ground Method"
    cost = ground
  elif premium < ground and premium < drone:
    best_option = "Premium Method"
    cost = premium
  else:
    best_option = "Drone service"
  `  cost = drone`
    
    return print("The best shipping option is %s with cost $%.2f"
           %(best_option, cost)     
                )
  
  
print(cheapest_shipping(4))

link: https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-control-flow/projects/sals-shipping