Every person who attempt to commit an offense against this code, and in such attempt does any act toward the commission of such offense, but fails, is prevented, or intercepted in the perpetration thereof, shall be guilty of any offense and shall be punished in the manner prescribed for the offense itself.
(Prior Code, Ch. 14, Art. 1, § 2)