Latest 8 taking avacation


#1



https://www.codecademy.com/courses/python-beginner-P5YtY/1/3?curriculum_id=4f89dab3d788890003000096

File "python", line 17
if days >= 7:
^
IndentationError: unindent does not match any outer indentation level

i dont kno what am doing wrong here...help pliz thanx


def rental_car_cost(days):
        cost = days * 40

    if days >= 7:
        return total - 50

    elif days >= 3:
        return total - 20

    else:
        return total


#2

It could be that cost is very indented inside of rental_car_cost, but I would also suggest getting rid of all the empty lines before the if, elif, and else statements.

Python is extremely pick about indentation so you just have to try moving things or simplifying everything.


#3

thanx so much gone through it...:blush:


#4

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