Number 6 need help LOL


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):
owed = 40 * days
if days >= 7:
owed -= 50
elif days >= 3:
owed -= 20
return owed

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

do I need to edit it or something


Hi @zachary_coyle_rhs ,

Because your code is not formatted, it is difficult for other users to read and debug it. After code is been pasted into the editing window for posting, you can format it by selecting it, and then by clicking the </> button above the editing area. This will enable us to see important details, such as the indentation and underscores.

In your trip_cost function, you did not include the spending_money in the total that you returned. You also omitted a comma after days in the function header ...

def trip_cost(city, days spending_money):

In your if and elif headers, you do not need parentheses around city, but they are not causing a problem.