Here is a possible solution for the chemical reaction problem.
reactionsystem_solution.ipynb
reactionsystem.py
reactionsystem_solution.pdf