I keep getting the same error (Oops, try again. trip_cost('Tampa', 6) raised an error: 'int' object is not callable ) when I try and submit the code. This doesn't happen for other parts of this exercise even if that part of the code hasn't been changed.
Here is the rest of the code:
def rental_car_cost(days): cost = 40*days 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): rental_car_cost = 40*days if days >= 7: rental_car_cost -= 50 elif days >= 3: rental_car_cost -= 20 return rental_car_cost def trip_cost(city, days): trip_cost = rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) return trip_cost(city,days)
It's worth noting that the specific error keeps changing between different cities when I attempt to re-submit the code.