Question 70
The code written for A first sets all the letters to the left of A as “left”, using the substring funciton. Of the oldStr, it keeps the first letter until the letter before the letter “n”, and discards the rest. Similarly, in “right”, the funciton uses substring to keep every letter to the right of “n”. By using concat on these two fragments, the only letter that is discarded is “n”.
For Answer C, the code sets every letter to the right of “n” as newStr, and then concats this newStr with every letter in oldStr to the left of “n”, setting it as a new “n”.
Question 60
RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone’s GPS unit to track a user’s location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs.
At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application shares the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other’s contact lists or if they typically run at similar speeds.
A basic RunRoutr account is free, but it displays advertisements that are targeted to individual users based on data collected by the application. For example, if a user’s running route begins or ends near a particular store, the application may display an advertisement for that store. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application.
Benefits of RunRoutr would be health benefits due to increased exercise.
Question 55
A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list.
For example, if utensils initially contains [“fork”, “spoon”, “tongs”, “spatula”, “whisk”], it should contain [“whisk”, “fork”, “spoon”, “tongs”, “spatula”] after executing the code segment.
Which of the following code segments transforms the list as intended?
Answer C works because it first sets the length of the utensils list as “len”, and then removes the last iten in utensils. It then sets the last item of utenisls as “temp”, and inserts it into the first position of the utensils list.
Question 48
Which of the following is an example of an attack using a rogue access point?
A fogue access point is a wireless access point plugged into an organization’s network that the security team does not know exists, so by using one to attack something, a user would be able to view data through weak or unrpotected security measures.
Question 44
A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing the program, a software developer discovers that some values appear to be mathematically imprecise. Which of the following is the most likely cause of the imprecision?
Roundoff errors are caused by rounding mathematical numbers to an integer or a number with less decimals, which would cause imprecise values.
Question 17
There have to be at least four points removed in order to disconnect B and C, since A, D, E, and F, all have to be removed in order to disconnect the two points.
Question 14
Line 6 determines if the list is decreasing, but returns true if it is decreasing, so line 12 and line 8 should be interchanged.
Question 9
Which of the following best explains how an analog audio signal is typically represented by a computer?
Analog audio uses a variable scale of information to reproduce the original sound waves from the source, so they are generally measured in regular intervals,
Question 7
Step 3 ensures that the counter adds one every step that is made, so since there are 4 moves made, the counter should show 4.
Question 3
100, which is first, is set to temp, which is later set to second, so second ends up as 100. First is originall 100, but is later replaced by second, which has previously been replaced by temp, which is 100, so both first and second are 100.
Reflection
I think taking the test under a time contraint was really stressful, but it helped me gauge how much time I typically spend on each question, and how fast I need to complete each question to be able to finish. A lot of the questions I missed also had to do with reading pseudo code, so I could watch more AP College Board videos or review mor of their syntax to figure out how the code, works, and how to correct incorrect code. A few other issues I faced were the questions at the end, where you select more than one answer. I always second-guess myself, so by leaving more time at the end to check my work, it will be less stressful, and I can become more confident of my answers.