The mayor and council shall have full power to pass all ordinances, bylaws and regulations which they may deem necessary to the good government of said city, the protection of property, peace, good order, health, comfort and convenience of the citizens thereof and to fix suitable penalties for the violation of the same. They may provide for punishing violators of the ordinances, bylaws, and resolutions by fine, imprisonment in the city prison, or working on public works; the fines in no case to exceed one thousand dollars ($1,000.00) and the imprisonment in the city jail or work camp not to exceed one year, and either one or all of said penalties may be imposed at the discretion of the recorder's court, (or mayor's court, as it may be).