McBadass

Exercise 4, Python 3.2

May 25th, 2011
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. cars = 100
  2. space_in_a_car = 4.0
  3. drivers = 30
  4. passengers = 90
  5. cars_not_driven = cars - drivers
  6. cars_driven = drivers
  7. carpool_capacity = cars_driven * space_in_a_car
  8. average_passengers_per_car = passengers / cars_driven
  9.  
  10. print("There are", cars, "cars available.")
  11. print("There are only", drivers, "drivers available.")
  12. print("There will be", cars_not_driven, "empty cars today.")
  13. print("We can transport", carpool_capacity, "people today.")
  14. print("We have", passengers, "to carpool today.")
  15. print("We need to put about", average_passengers_per_car, "in each car.")
Advertisement
Add Comment
Please, Sign In to add comment