The council is authorized to provide by ordinance for the division of the wards, or if there be no wards, for the division of the municipality, into such number of voting precincts as may be necessary, each as nearly as possible containing the same number of qualified electors.