-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex4.py
24 lines (22 loc) · 821 Bytes
/
ex4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Define numbers of cars
cars = 100
# Define car capacity
space_in_a_car = 4 # corrected after Study Drill 2
# Define Drivers
drivers = 30
# Define number of passangers
passengers = 90
# Calculate available cars
cars_not_driven = cars - drivers
# I don't know what is it for. Just a variable assign
cars_driven = drivers
# Calculate carpool capacity
carpool_capacity = cars_driven * space_in_a_car
# Calculate average
average_passangers_per_car = passengers / cars_driven
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_passangers_per_car, "in each car.")