Gender inequality in accessing STEM studies is a serious problem that higher education needs to solve. But the reasons for this are not clear yet. Among the arguments considered, a prevalent one has to do with a supposed innate male competence for science and engineering. In a controlled experiment involving 356 female and 394 male participants, of ages ranging from 6 to 18 years, subjects were asked to solve tasks by writing computer programs, and performance was measured as the number of tasks solved in a given time. Statistical analysis of the learning curves showed that female participants performed as well as male participants in acquiring coding skills and problem-solving. This result contradicts this innate bias, showing that both genders qualify at the same level for computer programming, and suggests policies to gender-balance affiliation to STEM careers, since an early exposure to the computer sciences might combat stereotypes like «coding is only for boys». In the paper we analyze in detail the main results of this experiment, as well as direct feedback from female and male subjects in solving the tasks.