Spending Money Hey you never know!


#1



Taking a Vacation: Hey You Never Know!


It says add the variable spending_money and modify the function to add it within the total cost. However, when it generates random variables, spending_money always = 0 so the total cost is always lower than what it should be.
trip_cost('Tampa', 4, 0) returned 700 instead of the correct value 920.
trip_cost('Los Angeles', 4, 0) returned 700 instead of the correct value 1175


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


#2

this:

    cost = rental_car_cost(days) + hotel_cost(days)
    + plane_ride_cost(city) + spending_money

should be one line, it are currently 2 lines.


#3

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