Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def hotel_cost(nights):
- return (nights * 140)
- def plane_ride_cost(city):
- if plane_ride_cost("Charlotte"):
- return (183)
- if plane_ride_cost("Tampa"):
- return (220)
- if plane_ride_cost("Pittsburgh"):
- return (222)
- if plane_ride_cost("Loas Angeles"):
- return (475)
- def rental_car_cost(days):
- cost = days * 40
- if days >= 7:
- cost -= 50
- elif days >= 3:
- cost -= 20
- return cost
- def trip_cost(city, days):
- return hotel_cost(nights) + plane_ride_cost(city) + rental_car_cost(days)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement