Help! Hey, you never Know? But i don't


#1

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
else:
return "no value"

def rental_car_cost(days):
cost = 40 * days
if days >= 7:
cost -= 50
elif days >= 3 and days < 7:
cost -= 20
return cost
def trip_cost(city,days):
return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city)
print trip_cost("Los Angeles", 5, 600)
trip_cost should take exactly 3 arguments


#2

What do you need help with?


#3

it says that i should have 3 arguments for trip_cost


#4

I have a feeling that this might be an indentation issue. If this is so, In order to help you I need you to post a formatted version of your code. If you need help doing so, please click the link below.

This is the link ---> How do I format code in my posts?


#5

Hi @joshuaj7713,

You have ...

def trip_cost(city,days):

Check the instructions regarding spending_money.

You need to include it within the function parameters, and in the total.


#6

link? I dont get you


#7

Because your posted code is not formatted, we cannot see its indentation. That is why @aquaphoenix17 provided you with a link to instructions on how to format posted code.

If it were formatted, we would be able to provide effective advice if there is in fact an indentation problem.


#8

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