Oops, try again. It looks like nothing was printed to the console!


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

def trip_cost (city, days, spending_money):
return hotel_cost(days) + rental_car_cost(days) + plane_ride_cost (city) + spending_money
return trip_cost
print trip_cost ("Los Angeles", 5, 600)


I get an error message. "Oops, try again. It looks like nothing was printed to the console!" I dont understand what im doing wrong. All my code is right uptil "def trip_cost" and it went wrong after I introduced Los Angeles and the city, spending money etc into the exercise.

I expected it to just print the city and cost etc. or atleast just say 'none', I have absolutely no idea what im doing wrong.


Replace this line with your code.


#2

This might have to do with your indentation, could you post your code using triple backlets? (```)

```python
   //paste your code here
`` `

And for what I can see there are two return statements in trip_cost.


#3

I'm having a similar issue. just get nothing printing to the console:
'''
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:
    return (40 * days) - 50
else:
    if days >= 3:
       return (40 * days) - 20
    else:
        return (40 * days)

def trip_cost(city,days,spending_money):
return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money

 print trip_cost("Los Angeles",5,600)

'''


#4

got it!
I indented the print.