PYTHON KODUNA ÇEVİRİLMESİ GEREKİYOR
A scientist is growing two types of bacteria in a flask. Each type of bacteria produces a chemical that is toxic to the
other one. Their features are as follows:
One mole of Bacteria A produces 0.33 mole of Bacteria A and one mole of Toxin A every hour.
One mole of Bacteria B produces 0.50 mole of Bacteria B and one mole of Toxin B every hour.
One mole of Toxin A kills 1% of Bacteria B every hour.
One mole of Toxin B kills 1% of Bacteria A every hour.
10% of Toxin A degrades every hour.
10% of Toxin B degrades every hour.
Initial conditions: @ Time = 0 hours : Bacteria A = Bacteria B = 10 moles, Toxin A = Toxin B = 0 moles.
Write a Python script that calculates concentrations of Bacteria A, Bacteria B, Toxin A and Toxin B in the flask every hour and
report it as:
Hour 5: X moles of Bacteria A, Y moles of Bacteria B, Z moles of Toxin A, Q moles of Toxin B.
The simulation should stop when the change in concentrations are less than 0.1% (steady state conditions) in an hour or
when a maximum of 1000 iterations are done.