Hi! Regarding exercise 5/7 "Pulling it together"
I was hoping somebody could explain why this works.
def hotel_cost(nights): return 140 * nights
def trip_cost(city, days): return hotel_cost(days) + plane_ride_cost(city) + rental_car_cost(days)
With regards to using the argument
(days) within the function
I don’t understand why this works and does not break the
Within the function,
140 is multiplied by the
nights argument is changed to
days , isn’t the function now broken since the value that
140 should be multiplied by, isn’t defined?
Thanks a lot!