Taking a vacation


def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
if city == 'Charlotte':
return 183
if city == 'Tampa':
return 220
if city == 'Pittsburgh':
return 222
if city == 'Los Angeles':
return 475

def rental_car_cost(days):
total = days * 40
if days >= 7:
total -= 50
elif days >= 3:
total -= 20
return total

def trip_cost(days, city):
return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city)

I have correct indentation, but I don't know why it changes it in the preview.

Anyways, I did what the instructions told me, and the error that shows up is:
Oops, try again. trip_cost('Pittsburgh', 8) raised an error: unsupported operand type(s) for -=: 'str' and 'int'
sometimes it has different cities and numbers in the parentheses. I'm out of ideas of what to do


switch days and city in the trip_cost parameters