Module 08 - Loops Flashcards
What is a loop iteration?
Refers to a single run of the code inside the loop
When you use a loop, such as a ‘for’ loop or a ‘while’ loop, the code inside the loop is repeated multiple times before the condition is met
True
What is frameCount()?
This variable counts the number of frames displayed since the program started
What is frameRate()?
Function that controls # of frames per second
What is noLoop()?
Function that stops the draw() function from executing continuously
Where should noLoop() be placed as an instruction?
At the end
What is loop()?
Function that resumes the execution of the draw() function
Don’t avoid loop in the setup() function
False
What does H,S,B stand for?
Hue, saturation, and brightness
How many arguments does the map() function require?
5
How does a poorly placed semi-colon lead to an infinite loop?
If you place a semi-colon in a location where its not supposed to be, it can lead to a logic error
How does a variable update logic error lead to an infinite loop?
You’re facing a problem in how you’re changing the variable of a code
How does an infinite loop due to float precision occur?
If you compare a floating point number using equality
What is the map() function?
When arguments 2 and 3 are in between the first argument and arguments 4 and 5 determine the last variable.
e.g. - map(200, 100, 300, 0, 50); = (25)