Every person who shall feloniously take or attempt to take from the person or from the presence the personal property of another and against his will by violence to his person or by putting such person in fear of immediate injury to his person by the exhibition of a deadly weapon shall be guilty of robbery and, upon conviction, shall be imprisoned for life in the state penitentiary if the penalty is so fixed by the jury; and in cases where the jury fails to fix the penalty at imprisonment for life in the state penitentiary the court shall fix the penalty at imprisonment in the state penitentiary for any term not less than three (3) years.