Transportation error


#1


    return 140 * nights
def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
    if city == "Tampa":
        return 220
    if city == "Pittsburgh":
        return 222
    if city == "Los Angeles":
        return 475
def rental_car_cost(days):
    cost = 40 * days
    if days >= 7:
        cost -= 50
        return cost
    elif days >= 3:
        cost -= 20
        return cost
    print cost 
      
the editor returns the error code "It looks like rental_car_cost returns None instead of the correct amount (40) for 1 days"

 what is wrong?


Replace this line with your code. Do not remove the backticks that are above or below this line.



#2

HI try to remove the print cost


#3

it returned the same error message


#4

this part

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

then you hsould indent the return cost like that

    elif days >= 3:
        cost -= 20
    return cost

#5

thank you that fixed it