What's wrong with this code? Taking a vacation 4/7


#1

This is my code:

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

it keeps saying Oops, try again. An error was raised for rental_car_cost(7): 'int' object is not callable


#2

Equals sign is missing.


#3

You could also go with:
def rental_car_cost(days):
price = days*40
if days >= 7:
price -= 50
elif days >= 3:
price -= 20
return price

I think it's the same result, with less typeing overall. I'm just learning myself, but this worked for me in the tutorial.