Scratch Variables - Lakelands Computing

Title
Go to content
Storing Information in Variables
We have looked at using Ask and Answer to gather information from the user. What if you want to keep that information though? Answer forgets it as soon as another question is asked.

To store the information we need somewhere to keep it. That somewhere is called a Variable.

Variables should always be named after the sort of information they will store - so a variable to store a persons name, might be called Username.

Note: You must create a variable before you can use it (sounds obvious but is worth saying).

You will find it all under Data or Variables - depends on which version you are using.
All Text copyright Lakelands Academy & Mr T Purslow 2020.
All images copyright free / creative commons unless otherwise stated.
You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
All Text copyright Lakelands Academy & Mr T Purslow 2020.  All images copyright free / creative commons unless otherwise stated. You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
All Text copyright Lakelands Academy & Mr T Purslow 2020.  All images copyright free / creative commons unless otherwise stated. You are welcome to use under a Creative Commons Attribution-nonCommercial-ShareAlike License.
Back to content