7/7 taking a vacation (it says nothing was printed)


#1

def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475

def rental_car_cost(days):
total = 40 * days
if days >= 7:
total -= 50
elif days >= 3:
total -= 20
return total

def trip_cost(city, days,spending_money):
return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money
print trip_cost("Los Angeles", 5, 600)


#2

this is right code.
i have print .

but i always have some problem. in the front of print should have block. after i remove blank the code is ok.


#3

Yeah make sure print is not indented. It took a long time for me to figure this out but it works :smile: