Skip to main content
CS Teaching Tips

Main navigation

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

Teach the concept of a variable’s scope in Scratch by explaining the difference between “For this sprite only” and “For all sprites.”

Share Teach the concept of a variable’s scope in Scratch by explaining the difference between “For this sprite only” and “For all sprites.” with FacebookShare Teach the concept of a variable’s scope in Scratch by explaining the difference between “For this sprite only” and “For all sprites.” with Twitter
  • Scope works a little differently in Scratch than in other languages. A variable that is "For this sprite only" can still be read by other sprites, but only the sprite that owns it can write to it. Variables that exist "For all sprites" act like global variables. This can help students when deciding what scope of variables to use for different tasks.

More about this tip

Tags

  • Scratch
  • Intro Programming
  • Algorithms and Design
  • Programming Concepts
External Source

Learn to Program with Scratch by Majed Marji

Other Tips By
Other Tips By Majed Marji

Similar tips

Create notes that look like Javadocs instead of introducing Javadocs so students are scaffolded in reading Javadocs without being overwhelmed by all the material available.
Be explicit about what direction references point when teaching about objects and references.
Have students sort large signs their classmates hold to better visualize different sorting algorithms. However, be mindful of unsuitable factors to sort by, such as height and weight.

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

Privacy Policy