It asks if i've defined rental car cost?


#1

this is my code

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

return rental_car_cost

what's wrong?


#2

I think something with your indentation is wrong. I copied your code (and indented it myself because in your post indentation got lost) and it let me pass.

It should look like this:

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

    return rental_car_cost