Please help me i have no ideal what is the problem


#1



it is said:
File "python", line 16
if days >= 7:
^
IndentationError: unindent does not match any outer indentation level
Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Take a look at the console window for the error message from the interpreter.


def hotel_cost(days):
    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):
     costperday = 40 * days
   if days >= 7:
      costperday = (140 * days) - 50
   elif days > 2 and days < 7:
      costperday = (40 * days) - 20
       return costperday

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


#2

this line is wrongly indented


#3

Could you please tell me how to fix it ?


#4

I just did. Make sure all your indents are correct by using the tab key


#5

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