Pull it Together


#1

Good day, would someone please help me, I keep getting the same error, even when I run the code with only

print "Hello World"

in it. This is the error message that I get:

Oops, try again. plane_ride_cost('Tampa') raised an error: plane_ride_cost() takes exactly 1 argument (0 given)

And here is the coding:

def hotel_cost(nights):
    
    return 140 * nights
    
def plane_ride_cost(city):
    
    if city == "Charlotte":
        return 183
        
    elif city == "Tempa":
        return 220
        
    elif city == "Pittsburgh":
        return 222
        
    elif city == "Los Angeles":
        return 475
        

def rental_car_cost(days):
    cost = 40 * days
    
    if days >= 7:
        cost -= 50

    elif days >= 3:
        cost -= 20

    return cost
    
def trip_cost(days, city):
    return hotel_cost(days) + plane_ride_cost(city) + rental_car_cost(days)
    
print trip_cost(7, "Los Angeles")

I dont know what to do anymore. Please Help!


#2

@heinbotha,

Have a close look at

"Tempa"