Skip to content

Sequence of Commands#

Your program will be run from top to bottom. Each command will be run by your computer one by one. That also means that these two are not the same:

size(300, 240);
circle(100, 100, 100);
rect(100, 70, 100, 100);

size(300, 240);
rect(100, 70, 100, 100);
circle(100, 100, 100);

As you can see, the order of commands matters. We're basically drawing on top of whatever is on our canvas already.

This is often referred to as "program flow".

Programming also has a bunch of options that change your program flow, we will get into those later in the course!