<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: unexpected indent (python, line 14)

<What do you expect to happen instead?>

```python

def rental_car_cost(days):
cost = days*40
if days >= 7:
return -=$50
elif days >= 3:
return -=$20
else:
return cost

def rental_car_cost(days):
cost = days*40
if days >= 7:
return -=50
elif days >= 3:
return -=20
else:
return cost

Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: invalid syntax (python, line 15)
Its also saying to remove the = sign

File â€śpythonâ€ť, line 15
return -=50
^
SyntaxError: invalid syntax

i did that and this comes up:

def rental_car_cost(days):
cost = days*40
if days >= 7:
return -50
elif days >= 3:
return -20
else:
return cost

Oops, try again. It looks like rental_car_cost returns -20 instead of the correct amount (100) for 3 days.

Ä°n this case, if the day between 3 and 7 the both process will be done. ( I mean the cost will be - 20 and - 50 at the same time). To prevent this, I wrote elif days >= 3 and days < 7:

def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
if city == â€śCharlotteâ€ť:
return 183
if city == â€śTampaâ€ť:
return 220
if city == â€śPittsburghâ€ť:
return 222
if city == â€śLos Angelesâ€ť:
return 475
def rental_car_cost(days):
return days * 40
if days >= 7:
return rental_car_cost - 50
elif days >= 3:
return rental_car_cost - 20
else:
return rental_car_cost

and i keep getting

Oops, try again. It looks like rental_car_cost returns 120 instead of the correct amount (100) for 3 days.

Anyone have any suggestions? Please explain too, still getting the grasp of this

def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
if city == â€śCharlotteâ€ť:
return 183
if city == â€śTampaâ€ť:
return 220
if city == â€śPittsburghâ€ť:
return 222
if city == â€śLos Angelesâ€ť:
return 475
def rental_car_cost(days):
car_cost = days * 40
if days >= 7:
return car_cost - 50
elif days >= 3 and days <= 6:
return car_cost - 20
return car_cost

And this seems to work. From what I can tell, I needed to define a separate variable for the actual cost, and use that

I have this one worked: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:
return cost - 50
elif days >= 3 and days < 7:
return cost -20
else:
return cost

but why not working like the example?

def rental_car_cost(days):
cost = days * 40
if days >= 7:
cost - =50
elif days >= 3 and days < 7:
cost -=20

return cost

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