I'm having trouble "Getting There"


#1

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_cosy (days):
return 40 * days
if days >= 7:
rent -= 50
elif days >= 3:
rent -= 20

Error:

File "python", line 6
elif city == "Tampa":
^
IndentationError: unindent does not match any outer indentation level

please help asap I don't know what I did wrong and I'm in class


#2

okay, I fixed the typo in line 12
just so you don't have to


#3

wait i just realized how dumb I am.
I posted it without indent indicators with an indent message.

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):
-----return 40 * days
if days >= 7:
rent -= 50
elif days >= 3:
rent -= 20


#4

wait I fixed all the indentation. because I'm an imbecile who can't read.
now it's saying

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


#5

:slightly_smiling:
def hotel_cost(nights):
# per night cost $140
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):
cost = 40 * days
if days >= 7:
cost -= 50
elif days >= 3:
cost -= 20
return cost


#6

Done!

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):
-----return 40 * days
-----if days >= 7:
---------rent -= 50
-----elif days >= 3:
---------rent -= 20


#7

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):
cost = 40 * days
if days >= 7:
cost -= 50
elif days >= 3:
cost -= 20
return cost