AP Computer Science Principles: Test Corrections
Question 1
My Answer: D Incorrect because the code segment never changes the value of second. The code segment is intended to swap the values of the variables first and second using a temporary variable, temp.
Correct Answer: B 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.
Question 14
My Answer: D Incorrect because both programs display ten values. I read the answer choice incorrectly. I read it as that Program A and Program B display different values. Instead the answer choice reads that Program A and Program B display a different number of values.
Correct Answer: C 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.
Question 23
My Answer: C Incorrect because There are multiple paths from P to S (for example, P to S and P to Q to S). I didn’t really understand what redudant routing was. Redunant routing is actually where there are several links and paths between the sender and the recipient. The question is asking for a configuration where it is NOT possible to have redundant routing between computers P and S.
Correct Answer: B Redundant routing is impossible if there is only one possible path from one device to another. There is only one possible path from P to S (P to R to Q to S).
Question 26
My Answer: C Incorrect because this code segment moves the robot up and down between its initial location and the square above its initial location.
Correct Answer: A This code segment rotates right whenever there is an open square to the right. The robot will move forward from its initial location to the upper-left corner of the grid, then rotate right, then move forward to the upper-right corner of the grid, then rotate right, then move down two squares, then rotate right, then move forward to the gray square.
Question 35
My Answer: A Incorrect because using samples from a music-streaming Web site could put the musician at risk of violating copyright laws. I didn’t know what a no-rights-reserved Creative Commons license was.
Correct Answer: D Creative Commons licenses can be used by creators of digital music to specify how the samples can be used by others. A no-rights-reserved license allows others to freely make use of the samples.
Question 43
My Answer: B Incorrect because the number of steps of the algorithm is a polynomial, so the algorithm runs in reasonable time.
Correct Answer: A The pattern in the table appears to indicate that there are n squared steps for a list containing n items. This number of steps is a polynomial and therefore the algorithm runs in reasonable time. Polynomial pattern = reasonable time?
Question 58
My Answer: C Incorrect because the Internet can lower geographic barriers to potential participants. However, there exist problems that cannot be solved in reasonable time, even with a distributed approach.
Correct Answer: A The Internet can provide tools, information, and knowledge to crowdsourcing participants and can lower geographic barriers to potential participants. However, there exist problems that cannot be solved in reasonable time, even with a distributed approach.
Google Searches
Citizen Science: Scientific research conducted with participation from the general public.
Internet Engineering Task Force: A standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite.
Lossy data conversion: A method where converting data between one storage format and another displays data in a form that is “close enough” to be useful, but may differ in some ways from the original.
Lossless compression: A class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information.
Open Standards and Protocols: They define how service providers (SPs) and identity providers (IdPs) exchange identity information.
Symmetric Encryption: A type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic data.
Abstraction: The process of removing elements of a code or program that aren’t relevant or that distract from more important elements.
Cloud Computing: The delivery of computing services—including servers, storage, databases, networking, software, analytics, and intelligence—over the internet (“the cloud”) to offer faster innovation, flexible resources, and economies of scale.