Instructions don't say $140/night hotel. Also, in general, shouldn't nights = days -1?


#1



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


nights should be days -1


instructions should include hotel is $140/night, does not appear in the instructions


def hotel_cost(nights):
    return 140 * nights


#2

We're splitting hairs, here. The names of the variables are arbitrary and certain assumptions were made at the outset. Number of nights will be equivalent to number of days for practical purposes.

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

#3

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