Taking a Vacation


#1



There's an issue with line 20 and I can't for the life of me remember how to add in python.
Please correct me
https://www.codecademy.com/courses/python-beginner-P5YtY/1/4?curriculum_id=4f89dab3d788890003000096#


def hotel_cost(nights):
    return 140*nights
def plane_ride_cost(city):
    if city=='Pittsburgh':
        return 222
    elif city=='Tampa':
        return 220
    elif city=='Los Angeles':
        return 475
    elif city=='Charlotte':
        return 183
def rental_car_cost(days):
    x=days*40
    if days>=7:
        x=x-50
    elif days>=3:
        x=x-20
    return x
def trip_cost(city,days):
    s =rental_cost(days)+hotel_cost(days)+plane_ride_cost(city))


#2

you have ")" in the end. delete it and replace s= with return.


#3

In trip_cost, you called the wrong function name. isn't is suppose to be rental_car_cost?


#4

yeah thanks guys I got it. Is there a way to remove a post so I don't waste anyone's time?


#5

u r welcome.
Just marked it as solved.


#6

you are welcome :slight_smile:


#7

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