(a) Scope of authority. The mayor and council shall have full power and authority to provide for the working of the convicts from the police court upon the streets and other public places and works of said city; to maintain, establish and equip, a jail, prison or guardhouse in said city for the safekeeping of prisoners and persons charged with violating the laws and ordinances of said city; and to provide for the care of such prisoners. (b) Ordinances to implement provisions. The mayor and council shall have the authority to enact such ordinances a.s are necessary to carry out the provisions of this Section.