Taking a vacation


im not too sure whats wrong here the error message says that the trip_cost should take exactly 2 arguments.

def hotel_cost(nights):
return nights*140
print nights*140
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):
rental= 40* days
if days >= 7:
rent = rental - 50
return rent
elif days >=3:
renta = rental -20
return renta
rental = days*40
return rental
def trip_cost(city, days, spending_money):
notreal = rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money
return notreal

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


Okay.. does it?

If you paint a ball and get a message "Oops try again, your ball should be red" You'd then want to compare the color of your ball to what that error message says it should be

What am I missing?


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