Getting There


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

I need help on the lesson and what am I doing wrong?

Replace this line with your 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


Any code that is part of a function needs to be indented so that python knows what to run when the function is called. In this case you if/elif/else statement is not indented beneath plane_ride_cost.


oh ok fixed it and got past


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