Introduction to Variables
- 
					
					
					
					
 DescriptionA variable is like a box. It allows your program to “remember things”. For example, you can store a number in a box:  Later, you can check what’s in the box:  You can also read out the number, change it, then put the new number back:  Making a VariableTo make a new variable, go to the “Variables” group, and click “Make a Variable”. You need to give it a name, such as “number”, then click “OK”. Note that every variable needs to be named differently.  Renaming a VariableIf you want to change the name of a variable, you can right-click on it, then select “Rename variable”.  Deleting a VariableTo delete a variable, you can right-click on it, then select “Delete the [censored] variable”.  Show or Hide a VariableIf you check the box to the left of a variable, it will be displayed on the stage, so that you can easily check its value. If you uncheck that box, the variable will disappear.  Setting a Variable’s ValueTo set the value of a variable, you can use this block:  You need to select which variable to set, and then input the value. The value can be a number or some text. Note that when you save the project, the value of a variable is saved as well. So the next time you open this project, the variable will contain the same value. Reading a Variable’s ValueTo read the value of a variable, you can use the reporter block:  Changing a Variable’s ValueIf a variable contains a number, you can use the “change variable” block to increase or decrease its value.  If you do not know how to use negative numbers, you can use the “reduce variable” block instead:  Show or Hide a Variable Using BlocksLastly, you can use these 2 blocks to hide or show a variable. For example, in your program, you might want to show a variable briefly then hide it.  
- 
				Pinned byinfo-creaticode