CB MCQ
Total Score:
Incorrect Answers
Question 11
Option C was incorrect. If input B is false, the resulting value coming out of the OR gate will be true (since the value of A is true). Since the value of C is true, the resulting value coming out of the AND gate is true. This result contradicts the statement. Therefore, Option A was correct.
Question 12
I read the options too fast and didnโt realize that option A was including both (onFloor1 AND callTo2) AND (onFloor2 AND callTo1) instead of OR. Therefore Option B was correct.
Question 14
Option D is incorrect because if A is inputted then it will lead to an OR situation which than could become a true statement. Therefore Option A is the correct answer because input A directly outputs true.
Question 15
Option D is correct because the robot will get stuck on the 5th and 6th block which will create a constant loop where the robot will move back and forth. Therefore this leads to Option A being wrong.
Question 17
I only selected one answer when there were 2 correct answers. Option D is also correct because the result <โ is on the outside which helps create the same output as the top one shown.
Question 27
The n<โn+1 occurs after the entire repeating code because with Option C, it does it before the repeating which makes it do an extra move every time unnecessarily when it is meant to happen after to lead to the right spot
Question 28
This option is correct. After one iteration of the โRepeat 2 timesโ loop, the robot will end up in the upper-right square facing to the left. After the second iteration of the Repeat 2 times loop, the robot will end up in the upper-left square facing down. The robot has finished in the gray square.
Question 30
Option B is correct instead of Option A because the draw circle command should come after the variables values have been calculated because then it will know with what dimensions to draw the circle.
Question 41
This option is incorrect. The statement โRandom (1 , 10)โ could evaluate to 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10. There is a one out of 10, or 10 percent, chance that it could evaluate to 2. If this happens, the value of โsumโ is increased by 1, which simulates a person voting for the candidate. This does not match the goal of the program, which is to simulate an election in which a certain candidate is expected to receive 20 percent of the vote.
Question 43
Computer simulations donโt necessarily have to be once the real-world object has been created. Computer simulations usually make some simplifying assumptions about the real-world object or system being modeled.
Question 45
This answer is wrong because it doesnโt make sense that a heuristic solution would be useful when the problem can be solved in a reasonable time, since youโre better off trying to actually solve the problem then.
Question 47
This option is incorrect. A heuristic is a technique that can find an approximate solution more quickly when exact methods are too slow. Calculating a grade can be done exactly and quickly by a program. Option C is correct because finding the shortest driving route is an optimization problem that cannot be solved in a reasonable time, and a heuristic is a technique that can find an approximate solution more quickly when exact methods are too slow.