I get an error message from the fourth and final function I have defined here. It seems that the order of the arguments matters (i.e. if define my function as def trip_cost(city, days): instead it works..). Is there a specific reason for this? Is it because of the order of the arguments in my function?
well just look at the order of which you have defined them. First city then days. And as you can see by the error that is shown on the screen, the code follows that order directly as trip_cost(Tampa [the city] 4 [number of days]. Therefore, your parameter for your trip_cost function has to match that order to run properly.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.