I dont know what i should do


#1



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

Oops, try again. It looks like rental_car_cost returns None instead of the correct amount (40) for 1 days.


return total cost


def hotel_cost(nights):
    return 140 * nights
    print nights * 140
    
def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
        print 183
   
    if city == "Tampa":
        return 220
        print 220
    
    if city == "Pittsburgh":
        return 222
        print 222
    
    if city == "Los Angeles":
        return 475
        print 475
        
def rental_car_cost(days):
    def rent(): 
        rent = days * 50
    if days >= 7:
        rent -50
    elif days >= 3:
        rent - 20
        return rent


#3

I don't see this in the instructions. A function in a function?

rent -50

rent - 20

These two lines don't do anything.

The instructions tell us that daily rental is 40, not 50.

Anything after return is unreachable. All the print statements in your code should be removed.


#4

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