Variable Blocks

notion image
  1. The Variables block gives you the value of the variable.
  1. The Set block assigns a value to the specified variable.
  1. The Change blocks changes the value of the specified variable.
  1. The Show block shows the value of the specified variable in the project player.
  1. The Hide block does the opposite of what the Show block does.
Variables are very helpful in programming because they allow us to store variables that we can then access later.
In Scratch, the Variable blocks can be found in the second-to-last section on the left sidebar, and these blocks are always ORANGE (slightly darker shade of orange than “Control” blocks).
Copyright © 2021 Code 4 Tomorrow. All rights reserved. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.