4/7 IndentationError



So I got this "IndentationError:unindent does not match any outer indentation level" message at line 19 (elif days >= 3:) and now I´m stuck!

Please tell me what I did wrong here! Thanks!


Sometimes it's really picky try to make your code go closer to the left


From what I can see in your picture, the if clause at line 16 is exactly one space behind the tab spaces that you have used in subsequent lines. Try shifting the if clause and the line above it by exactly one space to the right, and that should work.


def hotel_cost(nights):
nights == 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:
cost -= 50
elif days >= 3:
cost -= 20
return cost


pls tell me the error and please explain meaning of indentation error


you put your if statement two spaces too much to the right and if you are using two if statements for your second statement you need an elif statement



You need to correct your indentation level at line 16. That's what the error says. Tell me if this doesn't help.


Thanks a lot for sparing some time to help, guys!