Pull it together


#1

What's wrong? help....

def hotel_cost(nights):
----return 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
----else:
--------return "None"
print plane_ride_cost("Charlotte")

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

def trip_cost(city, days):
----city = raw_input("Where are you going?")
----days = raw_input("How long are you planning on staying?")
----return plane_ride_cost(city) + rental_car_cost(days) + hotel_cost(days)

print trip_cost(city, days)


#2

AW JEEZ, where do i start?


#3

def trip_cost(city, days):
----city = raw_input("Where are you going?")
----days = raw_input("How long are you planning on staying?")
----return plane_ride_cost(city) + rental_car_cost(days) + hotel_cost(days)

print trip_cost(city, days)

Here you are adding strings together. You should convert them to integers with int().


#4

Maybe by improving your attitude? See so much cynicism on the discussion boards anymore.