Sections 663 and 664 do not protect a person who, in attempting unsuccessfully to commit a crime, accomplishes the commission of another and different crime, whether greater or less in guilt, from suffering the punishment prescribed by law for the crime committed.