When the person intending to commit an offense has already performed the acts for the execution of the same but nevertheless the crime was not produced by reason of the fact that the act intended was by its nature one of impossible accomplishment or because the means employed by such person are essentially inadequate to produce the result desired by him, the court, having in mind the social danger and the degree of criminality shown by the offender, shall impose upon him the penalty of arresto mayor or a fine from 200 to 500 pesos.