Math Operations
Loops
Pixels and Images
Arrays
Miscellaneous
100

The result of running this code:

println(12/3)

What is 4?

100

2 kinds of loops

what are for and while

100

var p = image.getPixel(27, 50);

What is get the pixel color values from location x=27 and y=50 and assign them as an array to variable p?

100

nums[5] = nums[5] + 5

What is add the number 5 to the contents of the 5th element of array nums?

100

The data type for this value: 128

What is integer?

200

The result of running this code:

println("a" + "b")

what is "ab"

200

A loop that executes code a specific number of times

What is a for loop?

200

image.setRed(45, 90, 0)

What is set the pixel at x=45, y = 90 to have no red.

200

if nums[x] <5
   nums[x] = nums[x] + 8;
}

What is: add 8 to the element of of array nums at index 8, IF that element is already less than 5.

200

The term to describe a and b, the variables, in the following statement:
function magic(a, b){

What are parameters or arguments?

300

println(2**8)

what is 256?

300

What will this print?
var w = 5;
while (w<10){
   println(w*5);
}

What is an infinite loop that prints 25 over and over again.

300

function mystery(image, x, y){
var p = image.getPixel(x, y);
p[[1] = p[1] + 25;
image.setGreen(x, y, p[1]);
}

What is brighten the Green component of the pixel at (x, y) by 25?

300

var n = [18, 22, 5, 9];
n.push(22);
println(n);

What is [18, 22, 5, 9, 22]

300

The data type for this value: 13.75

What is float?

400

The result of running this instruction:

println(1%17);

What is 1?

400

What will this print?
var w = 5;
while (w<10){
   println(w*5);  
w = w + 1;
}

What is print:
25
30
35
40
45

400

var p = image.getPixel(27, 200);
p[1] = p[1] + 25;
image.setGreen(27,200,p[1]);

What is brighten the intensity of green in the pixel at x=27 and y=200 in image?

400

for (var x = 0; x < values.length;x++){
   values[x] = values[x] + 5;
}

Add 5 to each element in the array values[]

400

for (var j = 0; j<8;j++){
  println(2**j);
}

What is print the binary place values?

500

The result of running this code:
println(16%4)

What is 0?

500

for (var x = 0; x < image.getWidth(); x++){
  for (var y = 0; y < image.getHeight(); y++){
// some code
  }
}

What is the code to cycle through all the pixels in an image?

500

The data type for this value:
TRUE

What is boolean?