When students consider a function that produces incorrect outputs to be working, assign problems that provide clear on-screen feedback when a function is incorrect.

  • Young students often consider a function working if it produces output. As a result, they may neglect to consider whether it produces the intended output.
  • Yifat Ben-David Kolikant describes one teacher who cleverly combats this tendency: She "chose problems that would lead to clearly wrong onscreen feedback if incorrectly solved... One successful example was asking her students to use their own family details as test data for a program about familial relations, instead of using a hypothetical family. In this way, [the teacher] explained, unexpected output is noticed quickly by the students, motivating them to go back to their program code and refine it."

More about this tip

External Source

"Computer science as a cultural encounter" by Yifat Ben-David Kolikant, under "Building on students' cultural capital"