This study seeks to identify the effect that in-class teamwork activities have on the technical roles assumed by female engineering students in computer programming courses. During 2018 and 2019, a mixed methodology research was conducted in 2 phases. First, a qualitative study that consisted of 15 in depth interviews with current and former female engineering students. In addition, the research team conducted non-participatory observations in 2 courses, to identify elements of group dynamics in mixed gendered classes. This qualitative phase informed the quantitative study designed in the second phase. The quantitative phase took place in two computer programming courses associated to an undergraduate engineering program: Course A, which uses traditional lecture classes, and Course B, which uses project-based learning as the teaching methodology. In course B, a questionnaire (91 responses) was applied to identify the dynamics of role assignment in their teams. A self-efficacy questionnaire on computer programming was applied to courses A (n=33) and B (n =46) to compare the experience of women in the modality of individual and group work. The results indicate that women in course B tend to assume roles of coordination and work management, unlike men who define themselves as programmers or designers. The non-parametric tests applied indicate that when comparing the start and end of the course, the men and women of both courses significantly increased their overall self-efficacy. However, if only items that include execution tasks are considered, women in course B do not significantly improve their self-efficacy, unlike men from course B and both women and men from course A. Pedagogical recommendations are presented to improve self-efficacy of female engineering students in group-work based courses in computer programming subjects.