Score

score

Q5

Q5

The answer is C. The answer I chose was only true if x is true and y is false. The boolean stuff is still kind of confusing to me. A is correct as you need both sides to be true.

Q8

Q8

The answer is B, as the final iteration to the loop when j is 3, result[3] is the product of row 1,column 3 and row 3, column 2. So, the result[3] is assigned to value 4.

Q12

Q12

The answer is B. If x and y have different values, it results in false. According to De Morgan's law, the second part is !x && !y, so (x&&y) && (!x && !y) will always be false.

Q25

Q25

The answer is C. The answer I chose would be the value of count if inner loop started at 0 instead of x. The answer is c, as at the last iteration of the outer loop, inner loop iterates one more time, letting count be 10.

Q31

Q31

The answer is E. The answer I chose iterates board and set locations where row -- col to x and row + column == board.length-1 to "X". Starting out, first set of nested for loops set each element in board to "o".