8 Taking a vacation pullit together


#1

def trip_cost(city, days, spending_money):

return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money

and my last line of code:

print trip_cost("Los Angeles", 5, 600)

What's wrong with this?


Replace this line with your code.


#2

I would probably need to see the whole page of code, but it looks like the line "return rental_car ..... " should be indented so that it is nested under the definition for trip_cost.


#3

Thanks! I took the indent out on the print command and it worked.


#4

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