Every person who attempts to commit an offense, but fails to commit or is prevented from committing it, shall, where it is not otherwise provided, be punished as follows:
(1) If the offense attempted be punishable with life imprisonment, the person making such attempt shall be guilty of a felony and, upon conviction, shall be imprisoned in the penitentiary not less than three nor more than fifteen years.