208 Introduction to Computational Models with Python
14.2.4 Case Study 2
In a water treatment proc ess, every application of solvents removes 65% of
impurities from the water to make it more acceptable for human consumption.
This treatment has to be performed several times until the level of purity of
the water is adequate for human consumption. Assume that when the water
has less than 0.6 parts per gallon of impurities, it is ade quate for human
consumption.
In this problem, the data given is the contents of impurities in parts per
gallon of water. The initial data is 405 parts per gallon of impurities and the
growth factor is 0.35.
Listing 14.2 shows a Python program that computes the impurities of
water after each applicatio n of the solvent. The ...