Transportation: rental_car_cost(1): 'int' object is not callable


#1

I keep getting this error message which states "An error was raised for rental_car_cost(1): 'int' object is not callable" but I have no idea why. I have seen people with the exact same code on the forum and there's works perfectly fine. I have tried refreshing and restarting in case it was a bug.

Here is my code:

Does anybody have any ideas? They would be greatly appreciated.


#2

If their code is exactly the same they'd have the same behavior. Conclusion: not the same.

Consider what the error message is saying that you're trying to do, and look for places where it's possible that your code could be telling python to do that action.


#3

return cost Not return cost()


#4

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