Taking a Vacation: Indentation Error


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):
cost = 40*days
if days >= 7:
return cost -= 50
elif days >= 3:
return cost -= 20
elif days > 0:
return cost
def trip_cost(city,days):
return hotel_cost(nights) + plane_ride_cost(city) + rental_car_cost(days)

can you please tell me where i am doing things wrong. help will be appriciated
error showing is
File "python", line 14
if days >= 7:
IndentationError: unindent does not match any outer indentation level

Yoohoo! can anyone help me! something is wrong with my code!

@gaurav0503 ,

You have an IndentationError. However, we cannot see the indentation of your code, since it is not formatted.

Please format code when you post it, so that we can help.

See How do I format code in my posts?.


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