In Sal’s Shipping, I keep on getting a syntax error with the final function
https://www.codecademy.com/courses/learn-python-3/projects/sals-shipping
def cheapest(weight):
G = ground_shipping(weight)
D = drone_shipping(weight)
if G < D and G < premium_ground_shipping:
return(print("The cheapest shipping method is ground shipping, it will cost $" + str(G))
elif D < G and D < premium_ground_shipping:
return(print("The cheapest shipping method is drone shipping, it will cost $" + str(D)))
else:
return(print("The cheapest shipping method is premium shipping, it will cost $" + str(P)))
cheapest(10)
The Syntax error says the elif line is wrong, but I don’t understand how the if line is correct but the elif line isn’t.