Results after taking the test

Question 4

For this question I had to chose two answers, but I got one of them wrong. I chose the program will be easier for people to read which was right and the program will run faster which was wrong, the other correct was D, Tthe program will be easier to modify in the future, because using well-named variables allows the original programmer or another programmer to better understand what quantity a variable represents. This in turn can assist the same programmer or another programmer to know what parts of a program to modify and what side effects might occur when a given part of the program is changed in the future.

Question 18

For this question I chose A, Is anyone there?, this is wrong, the correct answer is better late than never.

Question 27

For this questions I chose C, but the correct answer is D

Question 28

For this question we had to choose 2 options, I got one of them wrong, I chose A which was right and B which was wrong, the other correct answer is C because 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 29

For this question we had to choose 2 options, I got one of them wrong, I chose A which was right and B which was wrong, the other correct answer is C because 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

I forgot to choose two options for this question, but the correct answers are B and C

Question 33

I chose D, but this is wrong because algorithm II will correctly identify the maximum value in all cases, including when the input contains both positive and negative input values, the correct answer is C because If the list contained [-7, -2, -5], algorithm I would initially set the value of max to -1. Since no data value in the list is greater than -1, the value of max would remain -1, which is not the correct behavior. Algorithm II would set the initial value of max to -7, and then change the value of max to -2. For all cases, algorithm II would return the correct maximum value in the list.

Question 38

The answer I chose is B, but this is wrong because If the initial value of number is 3, the REPEAT UNTIL loop will reduce the value of number to 1, and then to –1, at which point the loop will terminate. The procedure would return false for a value of number greater than 2, which contradicts this statement, but the correct answer is C because The REPEAT UNTIL statement subtracts 2 from the parameter number until the condition number ≤ 0 is true. After this REPEAT loop ends, the value of number is either 0 (if the original number was even) or –1 (if the original number was odd).

Question 45

The answer I chose is A, but the correct answer is C.