4/7 Transportation



Oops, try again. Did you create a function called rental_car_cost?

I've changed the function name several times and can't seem to get it work. The indentation seems weird. The hotel cost and plane ride cost are apparently right but trying to copy that same format for the rental car creates an indentation error. I've tried adjusting the previous code and new code and it gives me an error no matter what.

def hotel_cost(nights):
    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):
    costs= days*4
 if days >= 7:
 elif days >= 3:
 return costs


you need to multiply days with 40 not 4


Yea, thanks it's not what the issue was but, after playing with the indentation some more I got it to work.