Https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/pull-it-together-?action=lesson_resume


#1

https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/pull-it-together-?action=lesson_resume

There is no hint as what to do on this particular part of the exercise, so I have no idea how to proceed.

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):
  cost = days * 40
  if days >= 7:
    cost -= 50
  elif days >= 3:
    cost -= 20
  return cost

That’s what I have. Any hint on how to add on?


#2

There are instructions? You can follow those? They tell about the function you need to define, and what this function should do

If you just do everything of the hints, you are not learning much


#3

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