I dont get the IndentationError: unindent does not match any outer indentation level


#1

def rental_car_cost(days):
        cost == days * 40
    if days >= 7:
          cost -= 50
    elif days >= 3:
          cost -= 20
          return cost

i dont get the IndentationError: unindent does not match any outer indentation level


#2

Your indentation is not uniform and consistent. Python cannot properly interpret code that is not well formed.

Also, the return statement is inside a branch when it should be out in the open.


#3

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