Pull it together


#1

def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
if city =="Charlotte":
return 183
elif city =="Tampa":
return 220 * night
elif city =="Pittsburgh":
return 222 * night
else:
return 475

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

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

this my code :smile:
what must be changed of the code :frowning: ??


#2

Hello,

You should check out this thread: Hey you never know


#3

it's same problem
thanks bro :smiley:


#4

But you've got it resolved now, right?


#5

yapp it was solved
thanks bro


#6

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