Sorry if this is a very simple answer I am still very new to Python and coding in general. I'm not having any issues with completing the tasks but I am having issues fully understanding what I am doing. In my code for the exercise you complete it by entering print trip_cost("Los Angeles", 5, 600). I understand how Python can reference back "Los Angeles" but I dont understand how it assumes 5 for days and adds 600 into the extra cost of the trip. My only thought is that trip_cost must be a set function? Sorry again if this is very simple concept and if this is the wrong place to submit this. Any feedback is appreciated.
Here is my code for reference:
def hotel_cost(nights): return 140* nights def plane_ride_cost(city): if city == "Charlotte": return 183 elif city == "Tampa": return 220 elif city == "Pittsburgh": return 222 elif city == "Los Angeles": return 475 def rental_car_cost(days): cost = days * 40 if days >= 7: cost = cost - 50 elif days >= 3 and days < 7: cost = cost - 20 return cost def trip_cost(city, days, spending_money): return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money print trip_cost("Los Angeles", 5, 600)