python-water is a cli tool to calculate and illustrate how much liquid is in the j’th glass of the i’th row when K litres are poured into the top most glass.
Python 3.x Pytest
Before running tests, make sure Pytest is installed.
pip install -U pytest
To run the tests, execute the command:
pytest
python3 ./src/water_flow.py <row> <column> <amount-of-water-in-litres>
python3 ./src/water_flow.py 1 1 0.25
The amount in row 1, column 1 is: 0.250000
Row and column number start with 1. Glass capacity is hard-coded to 250ml (0.25L)