Santiago pls explain how your correct the error, some of us still stock in it :(


#1



Replace this line with your code.

Continuing the discussion from Hey, You Never Know! (6/7):


#2

May I ask you to post your code?


#3

Hey micro! So this was my previous (incorrect) code:
def hotel_cost(days):
return 140 *days

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 -= 50
elif days >= 3:
cost -= 20
return cost
def trip_cost(city, days, spending_money):
return rental_car_cost(days) + plane_ride_cost(city) + hotel_cost(days)


The thing is, I forgot to add spending_money to the last bit. That's all!
- Eli :smiley: