Taking a Vacation Transportation



Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: invalid syntax (python, line 17)

I don't see where the code is going wrong, as stated in the error message its something wrong with line 17, but I can't figure out what.

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):
    return total
    if days>=7:
    elif days>=3 or days>=7
    return total



you are missing a colon at the end of line 17


Also, you have a return statement inside of your rental_car_cost() which stops your code before it evaluates the days.


i saw that, but i actually only wanted to help with the current issue, hoping that the learner could find the next issue on his own, increasing learning and debug experience


Ahh, sorry. Didn't mean to spoil the surprise.


you couldn't have known, its not to blame you. I mean, sometimes i actually miss things. The cat is out of the bag (can i say this?) its good for other people reading the topic


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.