Plan your trip


#1



https://www.codecademy.com/courses/python-beginner-P5YtY/1/6?curriculum_id=4f89dab3d788890003000096#

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

this is driving me crazy , i refreshed , zoomed still not working


def hotel_cost(night):
    nightcost = 140
    return nightcost * night
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
    else :
        return "No City Chosen"
        
def rental_car_cost(days): 
    rental_car_cost = 40 * days
    if days >= 7:
        return rental_car_cost - 50 
    elif days >= 3:
        return rental_car_cost - 20 
    else: 
        return rental_car_cost
        
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)


#2

Rescue the line of "print" code


#3

what does that mean , I'm a noob sorry


#4

Your line of code "print" should be aligned with the "def" function.

Def
      Return
Print

#5

Thank you! That worked for me.


#6

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