A Qualitative Analysis of Students' Understanding of Conditional Control Structures

Shannon Collier, Mara Downing · 2019

Conditional logic and control structures are typically considered an important part of introductory computer science education, yet novices often struggle to correctly write and navigate such program logic. Previous research has largely attended to student difficulties with parsing Boolean expressions, but has not had much focus on the control structures themselves. To investigate how students work through complicated logic, we conducted a qualitative analysis of four one-on-one interviews with undergraduate students in which we gave students a piece of code with a complicated conditional control structure and asked them to write test cases for all paths. We found that several students struggled to determine the output the function would provide for a given input, and we hypothesize this occurred because they incorrectly treated an if statement as an else-if statement. One student simply wrote an incorrect output, which we believe occurred because they made this particular mistake, while another student got partway through the problem before verbally seeming to correct themself and re-identify a statement as an else-if. Based on our results, we hypothesize that novices may sometimes misidentify a sequential if statement as an else-if, which may lead them to incorrectly interpret a conditional control structure.

Read the paper · More papers on PaperTik