17 lines
787 B
Python
17 lines
787 B
Python
cars = 100 # amount of car
|
|
space_in_a_car = 4.0 # amount of seats in the car
|
|
drivers = 30 # amount of driver
|
|
passengers = 90 # amount of passenger
|
|
cars_not_driven = cars - drivers # amount of person which could not drive = 70
|
|
cars_driven = drivers # amount of person which could drive = 30
|
|
carpool_capacity = cars_driven * space_in_a_car # amount of seat for carpool = 120
|
|
average_passengers_per_car = passengers / cars_driven # 3
|
|
|
|
|
|
print("There are", cars, "cars available.")
|
|
print("There are only", drivers, "drivers available.")
|
|
print("There will be", cars_not_driven, "empty cars today.")
|
|
print("We can transport", carpool_capacity, "people today.")
|
|
print("We have", passengers, "to carpool today.")
|
|
print("We need to put about", average_passengers_per_car,
|
|
"in each car.")
|