I'm missing something obvious


I've been working with this for a couple of days now, looking through a whole bunch of threads where you guys have helped others with the same exercise, or similar problems, as well as external sources, but to no avail.

Whatever I write after the last "return" I get a different error, so I've simply left it blank now. I feel there is something fundamental about this last section that I don't understand, and I'd be much obliged if someone would give me a working solution, so I have something concrete to analyse.

Thanks in advance!



the url is the same for everyone, it checks for user to load that users code. So if i click the url, i will get my own code. So, please copy paste your code to the forum so we can help you


I see. Sorry.


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

End of code


from the instructions: return the sum of calling the rental_car_cost(days), hotel_cost(days), and plane_ride_cost(city) functions

how could we achieve sum? maybe add them together with +? this will give us the sum


I could swear I had tried every possible version of addition, but apparently not the most obvious one.

Thank you for your help and your patience! :smiley: