Every male person between the ages of twenty-one and fifty years, who has resided in said city thirty days, shall be liable and subject to work on the streets of said city, not to exceed fifteen days in each year, at such time or times as the mayor and council may require, or to pay a commutation tax in lieu thereof, not to exceed five dollars in any one year, as said mayor and council may determine. Should any person unable to work the streets under this section fail or refuse to do so, or to pay said tax assessed in lieu thereof, having received due notice to do so, as said mayor and council may require, shall be deemed guilty of a violation of this section, and on conviction in the police court of said city shall be fined in a sum not exceeding five dollars nor less than the amount of street tax so assessed, or by imprisonment in the guard house, or by labor in a chaingang of said city, not exceeding thirty days. Said mayor and council may pass such ordinance as they may deem proper for the enforcing of this section.