Pleas help me on 3/7 "Taking a vacation"


def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
if 'Charlotte':
return 183
elif 'Tampa':
return 220
elif 'Pittsburgh':
return 222
elif 'Los Angeles':
return 475
return 'Nope'

code academy says that tampa dose not return 220

I thought it would just let me pass

Replace this line with your code.


You can start by testing your function to determine whether the function is indeed incorrect.
And if it is, then you can consider how your function was supposed to reach 220 as the return value for 'Tampa'. Also consider what it currently returns and what might cause it to behave the way it did. After doing that, you will have collected a lot of information about what needs to change.


thanks but that still doesn't explain to me how my code doesn't meet the require that code academy sets.


never mind i found the answer.


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