Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

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

Share Ask questions about what parts of a program change to help students identify times when a variable is needed. with FacebookShare Ask questions about what parts of a program change to help students identify times when a variable is needed. with Twitter
  • 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

    Tags

    • CS 1
    • Intro Programming
    • Programming Concepts
    External Source

    Interview with Aaron Cadle.

    Other Tips By
    Other Tips By Aaron Cadle

    Similar tips

    When teaching about logical operations, give examples that use real-life situations or events.
    Misconception: Students think that it’s possible to write methods that add attributes to a Java class.
    When explaining code to the class, project your code and use a tablet to draw on top of it. Ask students for debugging suggestions to make them more comfortable finding bugs and to show them that all programmers, even you, make mistakes.
    • CSTT Facebook
    • CSTT Twitter

    For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

    Privacy Policy

    • National Science Foundation
    • Sage Fox Group
    • Harvey Mudd College