14 |
Program A and program B display a different number of values. |
Program A and program B display the same number of values, but the values differ. The programs each display ten values, but each value displayed by program B is one greater than the corresponding value from program A. Program A displays 1 2 3 4 5 6 7 8 9 10 and program B displays |
20 |
C: This option is incorrect. This expression produces the maximum of a and c subtracted from the sum of the maximum of a and b |
A: This expression will first determine the maximum of a and b and then determine the maximum of the resulting value and c. This will result in the maximum of all three values |
22 |
C: This option is incorrect. This Boolean expression will never evaluate to true because total (the number of temperatures in the list) will never be less than 50% of counter (the number of temperatures greater than or equal to 90). |
B: This Boolean expression evaluates to true when counter (the number of temperatures greater than or equal to 90) is greater than 50% of total (the number of entries in the list). |
26 |
D: This option is incorrect. This code segment moves the robot one square forward from its initial location and then rotates the robot right. From there, the robot cannot move forward and the body of the IF statement is never executed again. |
A: This code segment rotates right whenever there is an open square to the right. The robot will move forward from its initial location to the upper-left corner of the grid, then rotate right, then move forward to the upper-right corner of the grid, then rotate right, then move down two squares, then rotate right, then move forward to the gray square |
27 |
A: This option is incorrect. Inserting Win, left arrow, true between line 6 and line 7 will cause the loop to terminate regardless of whether the guess is correct. |
B: Inserting Win, left arrow, true between line 9 and line 10 will cause the loop to terminate when the guess is correct |
29 |
D: This option is incorrect. With these inputs, the AND gate will produce an output of false and the first OR gate will produce an output of true. The second OR gate will have one false input and one true input, causing the circuit to have an output of true. |
A: With these inputs, the AND gate will produce an output of false and the first OR gate will produce an output of false. Since both inputs to the second OR gate will be false, the circuit will have an output of false. |