Distinguish the differences between print statements and return statements to help students understand that these elements are not related because this conflation can cause a lot of confusion.

  • Often, the functionality of a print statement overlaps with a student’s mental model of what return is supposed to do.

    • This can cause problems.

  • A teacher’s belief that students understand return statements may be proven wrong when print statements come into the equation.

  • One strategy to avoid this confusion is to delay introducing print statements until after students have a solid understanding of return.

More about this tip

External Source

Interview with Owen Astrachan.