Basic Structure of a Randomizer - Answers Math.Random();
Range of Math.Random(); - Answers 0 (inclusive) - 1 (exclusive)
How random are randomizers? - Answers Randomizers are not entirely random. They have
formulas to create a random number.
Overall name for Randomizers - Answers PRNG - Pseudo Random Number Generators
Basic Structure of a For Loop - Answers for (var i = 0; i < num; i++) {
}
Step One of a basic for loop - Answers Initializer - initialize the variable i as a counter
Step Two of a basic for loop - Answers Condition - as long as the previously defined variable
follows the condition of the for loop, then the following program will run
Step Three of a basic for loop - Answers Increment - this changes the previously initialized
variable so that the variable will increase or diminish as a counter
Basic Structure of an If Statement - Answers if (boolean expression) {
}
What is the difference/importance of adding an "else" statement - Answers Using multiple if-
statements would mean that every if-statement would have to run.
Using and else or else if makes code more connected (more for readability)
Define Comparison Operators - Answers Operators/symbols that call for the comparison
between two values
== - Answers equal to
!= - Answers not equal to
> - Answers greater than
< - Answers less than
>= - Answers greater than or equal to
<= - Answers less than or equal to
Define Logical Operators - Answers Operators/symbols that call for a comparison between
boolean values in a boolean expression
, ! - Answers not
|| - Answers or
&& - Answers and
Basic Structure for Initializing a new shape - Answers var figure = new Shape (dimensions
depending on shape);
figure.setPosition(x, y);
figure.setColor(Color.**);
add(figure);
Basic Structure for Initializing Text - Answers var txt = new Text(string in quotes);
txt.setPosition(x, y);
add(txt);
Positions taken for a Circle, Rectangle, and Text - Answers Circle positions are set to the center
point;
Rectangle positions are set to the top left corner;
Text positions are set to the bottom left corner;
Determinate loops - Answers Loops specified with a certain amount of times to be run.
Any loop where the user knows how many times the loop will run.
Example of a determinate loop - Answers For loop
Indeterminate Loops - Answers Loops not specified with a certain amount of times to be run.
Any loop where the user doesn't know how many times the loop will run.
Example of an indeterminate loop - Answers While loop
Basic Structure of a While Loop - Answers while (boolean expression) {
}
Define Loop and a Half - Answers a while loop with a break
Basic structure of a Loop and a Half - Answers while (boolean expression) {
if (boolean expression) {