Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. def hotel_cost(nights):
  2. return (nights * 140)
  3.  
  4. def plane_ride_cost(city):
  5. if plane_ride_cost("Charlotte"):
  6. return (183)
  7. if plane_ride_cost("Tampa"):
  8. return (220)
  9. if plane_ride_cost("Pittsburgh"):
  10. return (222)
  11. if plane_ride_cost("Loas Angeles"):
  12. return (475)
  13.  
  14. def rental_car_cost(days):
  15. cost = days * 40
  16. if days >= 7:
  17. cost -= 50
  18. elif days >= 3:
  19. cost -= 20
  20. return cost
  21.  
  22. def trip_cost(city, days):
  23. return hotel_cost(nights) + plane_ride_cost(city) + rental_car_cost(days)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement