Every person who attempts to commit an offense against the code of ordinances of the town and in such attempt does any act toward the commission of such offenses but fails, is prevented or intercepted in the perpetration thereof, shall be guilty of an offense and shall be punished in the manner prescribed for the offense itself.
(`85 Code, § 16-2) Penalty, see § 130.99