Taking a Vacation - Pull It Together


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 = 40 * days
    if days >= 7:
        cost -= 50
    elif days >= 3:
        cost -= 20
    return cost
def trip_cost(city, days):
    return plane_ride_cost(city) + rental_car_cost(days) + hotel_cost(days)

I don't get what I'm doing wrong.

It always says: Oops, try again. plane_ride_cost('Charlotte') returned '183' instead of the correct value 183

But when I look back at my code and other threads on this topic they all look the same. Plus, it's returning 183, but it's saying that it's not...? I'm really confused. Please help. Thank you!


you return strings, you should return integers

Doing math with strings is so annoying.


I realized that just after I posted this. Thank you though!