The mayor and city council shall have power and authority to regulate the operation of motorized and nonmotorized vehicles and to exercise control over all traffic, including parking, upon or across the streets, roads, alleys, and walkways of the city; such power and authority shall include but not be limited to adopting uniform traffic codes for the regulation of traffic and prescribing penalties and punishment for violation thereof.