CP- Declaring and Initializing Variables Lesson

Declaring and Initializing Variables

You created a program in the last module using the basic functions to create primitive shapes in Processing. You entered values through the parameter of the function to set the size, location, and color. We actually hard-coded those values. Hard-coding refers to using the actual value in the parameter rather than using a variable to represent the data. This reduces the flexibility of the code because it cannot be changed easily.

Declaring and Initializing Variables Video

Watch the video below on Declaring and Initializing Variables.

[CC BY 4.0] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION