Skip to main content
CS Teaching Tips

Main navigation

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

Compare variables to gym scoreboards to help students understand them and how they can be used in a game.

  • Just like with scoreboards, variables are a spot that can hold a value.
    • For example, with points, the value that the variable holds goes up.
    • In contrast, with lives, the value the variable holds goes down.

More about this tip

Tags

  • Meaningful and Relevant Content
  • Programming Concepts
External Source

Interview with Dylan Ryder

Other Tips By
Other Tips By Dylan Ryder

Similar tips

Demonstrate swapping variables' values by swapping the contents of two cups full of liquid; you need a third cup to swap the liquids just like you need a third, temporary, variable to swap the values.
Use Dixie cups with numbers written on the bottom to demonstrate sorting arrays and heap operations in a tangible, physical way.
Have students instantiate personal hall pass objects when they wish to leave the classroom to help them learn that the values passed to a constructor have to match the number, type, and order of the arguments in the method signature.

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

Privacy Policy