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 city == "Charlotte":
- return 183
- elif city == "Tampa":
- return 220
- elif city == "Pittsburgh":
- return 222
- elif city == "Los Angeles":
- return 475
- else:
- return "I didn't understand you!"
- def rental_car_cost(days):
- cost = days * 40
- if days >= 7:
- return cost - 50
- elif days >= 3:
- return cost - 20
- else:
- return cost
- def trip_cost(city,days):
- return int(rental_car_cost(days)) + int(hotel_cost(days)) + int(plane_ride_cost(city))
Advertisement
Add Comment
Please, Sign In to add comment