Chlorine is a chemical element widely used as a disinfectant in swimming pools. It helps to kill bacteria, viruses, and…