Tri 2 College Board Final Exam Reflection

APCSP Tri 2 Final Results.png The reason I got this score because there were more conceptual questions than ever. The test was very challenging in more conceptual questions. To be honest, I will need a lot of practice for the AP exam. Tri 2 Final Question 14.png Reason the correct answer is C: Single-user copies of software are meant for one individual to use. Computer labs are meant for public use, so installing the software on the computers raises ethical concerns. Tri 2 Final Question 16.png Reason the correct answer is C: Students who enrolled to school being provided a laptop or a tablet is a big impact on the digital divide because laptops/tablets help students do a lot of research. Tri 2 Final Question 27.png Reason the correct answer is B: Subtracting num1 from num2 will give the difference between the two numbers. Taking the absolute value of the difference will give the distance as a positive number. Tri 2 Final Question 28.png Reason the correct answer is A: To remove the first 2 characters of oldString, this code segment takes a substring starting at position 3. To remove the last 2 characters of oldString, the substring ends at the position that is 4 characters less than the length of oldString (since 4 characters are removed). Reason the correct answer is C: The first statement removes the first 2 characters of oldString and assigns the result to tempString. The second statement removes the last 2 characters of tempString and assigns the result to newString. Tri 2 Final Question 29.png Reason the correct answer is B: The first three statements assign values to the variables. The fourth statement assigns the value of (NOT (a OR b)) AND c to a. Since a OR b is true, NOT (a OR b) is false, so (NOT (a OR b)) AND c is false. The fifth statement assigns the value of c AND a to c. Since a is now false, c AND a is false. The last three statements display the values of the variables. Tri 2 Final Question 31.png Reason the correct answer is D: The algorithm continues past the first check if the time is during business hours, the algorithm continues past the second check if the gate sensor is activated, and the algorithm continues past the third check if the gate is not open. Performing the checks in this order will ensure that the gate is opened only under the appropriate conditions. Tri 2 Final Question 33.png Reason the correct answer is B: The loop that repeats four times returns the robot to its starting position. The three lines of code that follow the loop move the robot one row up and leave it facing right. When this has been repeated twice, the robot is in the gray square. Tri 2 Final Question 40.png Reason the correct answer is D: In order for the robot to move from the gray square back to its original position, it must move forward two squares, turn right, move forward four squares, turn left, and move forward two squares. The same set of moves can be used in both directions, so no change is needed to the algorithm. Tri 2 Final Question 41.png Reason the correct answer is B: In order for a binary search on a list to work as intended, the list must be sorted. Tri 2 Final Question 43.png Reason the correct answer is D: The call to proc2 assigns “birthday” to the parameter str1 and “to you” to the parameter str2. The first statement in proc2 calls proc1 and assigns “to you” to proc1’s parameter str. The proc1 procedure displays the value of str (“to you”) followed by “happy”, then terminates execution and returns to the point in proc2 immediately following where proc1 was called. The proc2 procedure displays the value of str1 (“birthday”) and then terminates execution. Tri 2 Final Question 44.png Reason the correct answer is B: The first call to printArgs displays the number 1, followed by the string “*”, followed by the number 1. The second call to printArgs displays the number 2, followed by the string “”, followed by the number 2. Tri 2 Final Question 45.png Reason the correct answer is C: Procedural abstraction helps improve code readability. Reason the correct answer is D: Procedures created to solve subproblems of a larger problem are called by name. Tri 2 Final Question 46.png Reason the correct answer is C: The sum of the values in the file can be divided by the number of values in the file (10,000) to compute the desired average. Tri 2 Final Question 50.png Reason the correct answer is A: As the size of the list grows, the number of steps needed to sort the list grows at a linear rate, as the number of steps is equal to 10n for a list of size n. This is an example of a polynomial efficiency and indicates that the algorithm runs in a reasonable amount of time. Reason the correct answer is D: The number of steps for this algorithm is equal to the length of the list squared, as the number of steps is equal to n2 for a list of size n. This is an example of a polynomial efficiency and indicates that the algorithm runs in a reasonable amount of time.