Sal's shipping project

Hi guys,
I’m kind of struggling with a project here,

it gives me the following error:

Traceback (most recent call last):
File “script.py”, line 34, in
cheapest_shipping_method(7)
File “script.py”, line 27, in cheapest_shipping_method
if cost_ground_shipping<=premium_shipping_cost and cost_ground_shipping <= cost_drone_shipping:
TypeError: ‘<=’ not supported between instances of ‘function’ and ‘float’

Errors are helpful? They tell us what is wrong

the error displays different code:

if cost_ground_shipping<=premium_shipping_cost and cost_ground_shipping <= cost_drone_shipping:

then the gists:

if cost_ground_shipping<premium_shipping_cost and cost_ground_shipping<cost_drone_shipping:

despite the different comparison operators used, the same problem remains. the function (cost_ground_shipping) can’t be compared to the a float

you would need to call/invoke the function, given the functions return a float result.

1 Like

Thanks a million,
and how do I call/invoke the function?

Hasn’t that been taught? Sounds like something you could find in earlier lessons or documentation.