This function runs only once when the program starts.
What is setup()?
In the statement for(let i = 0; i < 10; i++), which part tells the loop to stop when i reaches 10?
what is "The condition: i < 10"?
random(50) will give you a number between 0 and what?
what is 50?
Where is the coordinate (0, 0) located on a p5.js canvas?
what is "the top-left corner"?
In rect(10, 20, 50, 80), what do the first two numbers (10, 20) represent?
what is "The X and Y coordinates of the top-left corner"?
This function runs in a continuous loop at roughly 60 frames per second.
what is draw()?
In a for loop, what does i++ do to the control variable?
what is "Increments it by 1"?
What is the range of numbers generated by random(10, 20)?
what is "Any number from 10 up to, but not including, 20"?
If your canvas is createCanvas(400, 400), what variable represents the number 400?
what is "width or height"?
By default, where is an ellipse() drawn from: its center or its top-left corner?
what is "its center"?
This command goes inside setup() to set the width and height of your project.
what is createCanvas(w, h)?
How many times will a loop run if the condition is (let i = 0; i <= 5; i++)?
what is "6 times"?
True or False: random() always returns a whole integer (like 5) by default.
what is false? {{it returns decimals/floats }}
Which coordinate increases as an object moves down the screen: X or Y?
what is Y?
To draw a line(), how many total coordinates (numbers) must you provide inside the parentheses?
what is four? {{(x1, y1, x2, y2) }}
If you move the background() command from draw() into setup(), what happens to a moving circle?
what is "It leaves a trail/smear behind it"?
What happens if you accidentally create a loop where the condition is always true?
what is "the Infinite Loop"? / what is "The browser crashes"?
If you want a random whole number between 1 and 10, what extra function do you need to wrap around the random?
what is floor()?
What variable in p5.js automatically tracks the X-position of your mouse?
what is mouseX?
When creating a custom shape with vertex(), what two commands must you use to "sandwich" your vertex points?
what is "beginShape() and endShape()"?
What is the default "Frame Rate" of the draw() function?
what is 60 FPS?
Write the code for a loop that counts from 0 to 100 by tens.
what is "for(let i = 0; i <= 100; i += 10)"?
How do you generate a random color for a shape's fill?
what is fill(random(255), random(255), random(255))?
How do you move an object to the exact center of any sized canvas using variables?
what is (width/2, height/2)?
If you want a rect() to behave like an ellipse() and be drawn from its center, what command do you need to run first?
what is "rectMode(CENTER);"?