Ask questions about what parts of a program change to help students identify times when a variable is needed.

  • When you are trying to motivate variable use in a program, ask students:

    • What might be changing in this program?

    • How is it changing?

  • With the help of these motivating questions, you can then point out that we need a variable to keep track of that thing that is changing!

More about this tip

External Source

Interview with Aaron Cadle.