Vacation - nights/days?


#1



I would say, that there is a misleading formulation. Your solution doesn't correspond with the fact, that I pay a hotel for night. For example... If I spend five days in a town, I pay five days for a car, but only four nights for a hotel...
:wink:


rental_car_cost(days) + hotel_cost(days) # your way
rental_car_cost(days) + hotel_cost(days - 1) # my way


#2

well, i can think of a dozen other features you can add (more destination, options for user input, validation for user input and so on) at certain point choices have to be made otherwise the exercise becomes really massive.

Of course, nothing is stopping you from improving the program


#3

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