Getting There cant get it


#1

Any advise here guys please.

def hotel_cost(nights):
  nights == 140
  return nights * 140

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

getting an error that says : Did you create a function called plane_ride_cost?


#2

Need a capital A on ‘angeles’.


#3

Still getting the same error.


#4

If statements require a colon to start the code block for each clause…

    if ____:
        '''
        code block
        '''
    elif ____:
        '''
        code block
        '''
    else:
        '''
        code block
        '''

#5
def hotel_cost(nights):
  
  return nights * 140

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

Found the issue. it was that I had return == 220, just removed the ==.

thank you


#6

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