The council may provide in any ordinance for the punishment of those who violate its provisions. The punishment for the violation of any city ordinance shall not exceed a fine of five hundred dollars, or imprisonment for ninety days, or both, in the discretion of the court.