https://www.codecademy.com/courses/learn-python-3/projects/sals-shipping
Hi, regarding the last checkbox, can anyone tell me why this gives:
File “script.py”, line 42
return "The cheapest shipping method is via Ground Shipping, $ {cost_ground()}.".format(cost_ground() = cost_ground(weight))
^
SyntaxError: keyword can’t be an expression
def cheapest(weight):
if cost_premium < (cost_drone(weight) or cost_ground(weight)):
return "The cheapest shipping method is via Premium Ground Shipping, $ {cost_premium}.".format(cost_premium = cost_premium)
elif cost_drone(weight) < (cost_ground(weight) or cost_premium):
return "The cheapest shipping method is via Drone Shipping, $ {cost_drone()}.".format(cost_drone() = cost_drone(weight))
elif cost_ground(weight) < (cost_drone(weight) or cost_premium):
return "The cheapest shipping method is via Ground Shipping, $ {cost_ground()}.".format(cost_ground() = cost_ground(weight))
print(cheapest(4.8))
print(cheapest(41.5))