Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- city = raw_input("Type the city you're visiting."
- )
- nights = raw_input("How many nights will you be staying for?")
- def hotel_cost(nights):
- if nights:
- print
- return 140 * nights
- def plane_ride_cost(city):
- if city == "Charlotte":
- print
- return 183
- elif city == "Tampa":
- print
- return 220
- elif city == "Pittsburgh":
- return 222
- print
- elif city == "Los Angeles":
- return 475
- print
- else:
- return "Please enter a valid location/amount of nights"
- print plane_ride_cost
- print hotel_cost
- days == raw_input("Enter number")
- def rental_car_cost(days):
- rent = 40 * days
- if days >= 7:
- return rent - 50
- elif days >= 3:
- return rent - 20
- else:
- "please enter a number"
- return
- print rental_car_cost
- MEssages shown in console:
- Type the city you're visiting. Tampaa
- How many nights will you be staying for? 3
- <function plane_ride_cost at 0x1857f50>
- <function hotel_cost at 0x1857c08>
- Enter number 3
- <function rental_car_cost at 0x184f050>
- None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement