If any person knowingly votes when not legally entitled; or votes more than once in the same election; or knowingly votes or attempts to vote more than one ballot for the same office, or on the same question; or procures or assists in procuring an illegal vote to be admitted, or received, at an election, knowing the same to be illegal; or a legal vote to be rejected, knowing the same to be legal; or, with intent to deceive, alters the ballot of a voter by marking out the name of any person for whom such voter desires to vote; or, with like intent, writes the name of any person on such ballot other than those directed by the voter; or with like intent, makes any alteration thereof, whether such ballot be voted or not; or defrauds any voter at any election, by deceiving and causing him to vote for a different person for any office than he intended or desired to vote for, he shall be guilty of a misdemeanor, and, on conviction thereof, shall for each offense be fined not more than $1,000 or confined in the county jail for not more than one year, or both, in the discretion of the court.