Misconception: Students get confused about whether to set or change variables in Scratch.

Like(1042 Likes)
  • Ask students whether it matters what the value of the variable was beforehand when deciding between using "set" and "change" blocks.Contrast Set and Change blocks in Scratch to help students distinguish between them.
    •  If the initial value of of the variable doesn’t matter, students should set the variable to a certain value, as in the block below.
    • set x to (0)
    • If the initial value of the variable does matter, students should change the variable by a certain value, as in the block below.
    • change x by (10)
  • I use the phrase "Set ignores the variable’s old value. Change modifies the variable’s old value." When students make the mistake of using the wrong block, I’ll ask "do you want to set the variable or change it?" and/or ask them "what’s the difference between set and change?"

  • Example: "Set ignores the old value. Change modifies the old value."

  • See this and related tips as a Tip Sheet: http://csteachingtips.org/tips-for-teaching-scratch

External Source

Colleen Lewis' CS10K Scratch Webinar

Other Tips By