Help with Transportation


#1

So here is my code:

def hotel_cost(nights):
    return 140 * nights
def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
    elif city == "Tampa":
        return 220
    elif city == "Pittsburgh":
        return 222
    elif city == "Los Angeles":
        return 475
    
def rental_car_cost(days):
        total = 40 * days
    if days >= 7:
        total -= 50
    elif days >= 3
        total -= 20
    return total

And when I run it it tells me:

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

please help me. Ive been sitting here really long and just wanna get on


#2

un indent this line once, so it's in line with

if days >= 7:

also,

 elif days >= 3

needs to be

 elif days >= 3:

(wth the colon) :)))))))


#3

OMG thanks soo much finnaly moved on. I didn't realize the indentation. Well thanks again for the quick reply too::slight_smile:


#4

No problem, glad you moved on :)))


#5

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