Taking a vacation


#1

In the lesson TAKING A VACATION, exercise number 5, we are told to change the argument of hotel_costs() from ‘nights’ to ‘days - 1’ so the code should look like this:

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

But in exercise 6 and 7 the argument of hotel_cost ‘days - 1’ changes to showing only the argument ‘days’ and the code ends up looking like this:

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

Why does it change? Is it a bug?


#2

Hey @codenamephil

I went back over the lesson you mentioned; it looks like you’re right, the code does seem to change back to using hotel_cost(days). I think that might be an error.

You can report the bug through the link at the bottom of the instructions panel on the left of the screen.

image

That should flag it up to the relevant people to review. :slight_smile:


#3

Oh great, I got so confused and frustraded, I thought I missed something when going through the lesson.

Yes, I already did, but I dont think they reply when you report something, so I thought I should ask somebody here about the issue too. It was really bothering me, I needed to know if it is a bug/error or not.

Thank you for your reply, now I can continue with the course :wink:


#4

No worries. Yeah, I don’t think you get a direct reply to the bugs that are reported that way; they just get fired off to the good folk at Codecademy to review and sort if necessary. :slight_smile:


#5

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