2018 MCQ Reflection

Question #1

B is correct because the code segment assigns the initial value of first to temp, then assigns the initial value of second to first. The initial value of first, which has been stored in temp, is then assigned to second. Therefore, the initial values of first and second have been interchanged. I put C because I misread it and saw that second is temp is never changed.

Question #14

C is correct because 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 2 3 4 5 6 7 8 9 10 11. Option A is wrong because the programs realistaclly don’t display the same values.

Question #31

Option B is wrong which I put is wrong because Program I also correctly moves the robot to the gray square by repeatedly moving the robot forward, rotating left, moving forward, and rotating right.C is correct because Program I effectively maneuvers the robot to the gray square by employing a sequence of actions that include moving the robot forward, rotating left, moving forward, and then rotating right. On the other hand, Program II adeptly guides the robot to the gray square by first moving it forward to the upper-right corner of the grid, rotating left, and finally moving forward to the upper-left corner of the grid.

Question #41

B is correct because this expression uses theMax procedure to replace the midterm score with the higher of the two scores. The selected value is then added to the final exam score and assigned to One word, adjusted Total. The option I put is wrong because the expression only assigns one value to adjustedTotal.

Question #46

I got this problem wrong because I made a silly mistake, I should have knows that it isn’t possible to solve an infinite loop. D is correct because an undecidable problem is one in which no algorithm can be constructed that always leads to a correct yes-or-no answer.

Question #51

I didn’t really know what the difference between symetric and asymetric encryption was. Now I know, asymetric uses two seperate keys, while symetric encryptioon uses a single key. Option B is correct because it shows symmetric encryption thoroughly because the secret key is used for both encryption and decryption of messages.