Taking a vacation - Pull it together


#1


https://www.codecademy.com/courses/python-beginner-P5YtY/1/4?curriculum_id=4f89dab3d788890003000096

Not that code behaved incorrectly, just curiosity about its algorithm. I thought since they wouldn't be using the hotel on last day of vacation, I subtracted one from hotel_cost argument and they said it's incorrect. When I deleted subtraction part, then they said its correct, but I think one should be subtracted from the argument. What am I thinking wrong?


Replace this line with your code.


#2

Depends on when they arrive and depart eh.


#3

The instructions say for nights in the first part of the lesson. Nights is not the same as days. I had to modify my argument passing the days to the hotel_cost(). Nights should be days - 1 to make it correct for the final number. You can't do that as it won't allow the total.
If they mean days, they should say days and make that universal versus confusion with the nights place holder as the nights doesn't correctly get input if it is nights.

This may just be an errata they need to fix on the listing, but it took me hours to figure out that if I just replace the nights with days it will work fine.


#5