Tri 2 Final Reflection
Tri 2 College Board Final Exam Reflection
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. 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. 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. 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. 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. 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. 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. 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. 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. Reason the correct answer is B: In order for a binary search on a list to work as intended, the list must be sorted. 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. 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. 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. 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. 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.