Variables

Vocabulary:

Variable: A placeholder for a piece of information that can change.

New Code:

It is important to remember the labels you assign to your variables. Your Lable needs to be first in your code and the value comes after.

The = (equals) symbol is called the assignment operator. The equals symbol represents "gets the number"

If you wanted to be able to change your height, weight, eye color, or even hair color, You would need to create a Variable block or var height; for you to then change.

Remember to click Show Grid and that the top left corner is 0,0 and each square is 50.

In this code, the variable is labeled "circleSize and it gets the number of 450. When the code is run, your variable block labeled "circleSize gets the number 600. Then Fills the color "crimson" and finally creates an ellipse located at X 200, Y 200 with the size being circleSize. That label referencing the variable as being 600.

Naming Variables: Variables need to be meaningful, but you can choose almost any label you like. There are just a few rules to be aware of.

Your label can be two or more words. If this is the case, your first word needs to be lower case but the others need to be capital letters. When the label is put in one word, the capital letters help you identify the multiple words.