A second set of 20 questions from the College Board's 2021 AP CSP Practice Exam — no overlap with Practice Set 1
How to Use This Practice Set
20 different questions from the 2021 AP CSP Practice Exam — none of these appear in Practice Set 1. Mixed across Big Ideas just like the real exam.
Each question has a topic tag. After finishing, look for patterns in which topics gave you trouble.
Click an answer to get instant feedback with the explanation from the official College Board answer key.
The score tracker at the top updates as you go. The real exam gives you about 1m 43s per question.
Attempted:0 / 20
Correct:0
Accuracy:—
Question 1Data2021 Practice Exam · Q9
Which of the following best explains how an analog audio signal is typically represented by a computer?
Official Explanation
B is correct. Analog signals are sampled digitally at discrete intervals over time. These samples — like all digital data — are represented at the lowest level as a sequence of bits.
Question 2Impacts2021 Practice Exam · Q13
Which of the following is NOT a benefit of collaborating to develop a computing innovation?
Official Explanation
C is correct. While effective collaboration benefits from diverse talents and perspectives, collaborators still need to develop strategies to resolve differences of opinion — collaboration doesn't make those disagreements go away. A, B, and D are all genuine benefits.
Question 3Algorithms2021 Practice Exam · Q26
Which of the following best describes a challenge involved in using a parallel computing solution?
Official Explanation
A is correct. If each step depends on the preceding step's output, the steps are inherently sequential — parallel processors can't help because each step must wait for the previous one to finish. B, C, and D all describe workloads that parallelize well.
Question 4Algorithms2021 Practice Exam · Q33
A company delivers packages by truck and wants to minimize the length of each driver's route to n delivery locations. Two algorithms are being considered:
Algorithm I: Generate all possible routes, compute their lengths, and select the shortest. Does not run in reasonable time.
Algorithm II: Starting from an arbitrary location, find the nearest unvisited location. Continue until all locations are visited. Does not guarantee the shortest route. Runs in time proportional to n2.
Which of the following best categorizes Algorithm II?
Official Explanation
B is correct. A heuristic is an approximate solution that runs in reasonable time when finding an exact solution doesn't. Algorithm II runs in n2 (polynomial = reasonable time) and gives a good-enough answer. The problem is not undecidable — Algorithm I would solve it exactly given unlimited time.
Question 5Data2021 Practice Exam · Q35
A city maintains a database of all traffic tickets issued over the past ten years. Tickets are divided into moving violations and nonmoving violations. The data recorded for each ticket includes only:
The month and year the ticket was issued
The category of the ticket
Which question CANNOT be answered using only the information in the database?
Official Explanation
B is correct. The database tracks only the month and year, not the specific day — so there's no way to tell weekend from weekday. A, C, and D all only require counting by year, by month, or by category, which the data supports.
Question 6Impacts2021 Practice Exam · Q36
Individuals sometimes attempt to remove personal information from the Internet. Which of the following is the LEAST likely reason the personal information is hard to remove?
Official Explanation
D is correct. The opposite is true — personal information often ends up in places where authentication is not used (social media posts, forums, public records). A, B, and C all describe real reasons removal is hard.
Question 7Algorithms2021 Practice Exam · Q38
A scientist wants to investigate several problems. In which situation is using a simulation LEAST suitable?
Official Explanation
D is correct. Simulations are abstractions, useful precisely when real-world events are impractical, slow, or dangerous. If the solution actually requires continuous real-world data, a simulation isn't the right tool — you need the real measurements.
Question 8Data & Binary2021 Practice Exam · Q39
A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory?
Official Explanation
C is correct. 6 bits gives only 26 = 64 unique sequences — not enough. 7 bits gives 27 = 128 sequences — enough for up to 128 items. So 7 is the minimum. 8 bits would work but isn't the minimum.
Question 9Impacts2021 Practice Exam · Q40
A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to contribute to the digital divide rather than reducing it?
Official Explanation
B is correct. Requiring online-only job applications excludes the exact people the digital divide describes — those without reliable internet or devices. A, C, and D all expand access (literacy, hardware, infrastructure).
Question 10Data & Binary2021 Practice Exam · Q44
A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing, a developer discovers that some values appear mathematically imprecise. Which is the most likely cause of the imprecision?
Official Explanation
B is correct. Real numbers stored in a fixed number of bits often can't be represented exactly, causing round-off (imprecision) errors. Overflow is about exceeding the maximum value, not imprecision. C and D are nonsensical — "unlimited bits" wouldn't cause either error.
Question 11Pseudocode2021 Practice Exam · Q47
A spreadsheet stores restaurant data. In column B, the price range is "lo" (under $10), "med" ($11–$30), or "hi" (over $30). In column D, the average customer rating is a decimal.
A student wants to count restaurants whose price range is $30 or less and whose average customer rating is at least 4.0. For a given row, prcRange contains the price range as a string and avgRating the average rating as a decimal.
Which of the following expressions evaluates to true if the restaurant should be counted and false otherwise?
Official Explanation
B is correct. We need BOTH a good rating AND an inexpensive price — outer operator is AND. A single value of prcRange can be "lo"or"med" but never both, so the inner operator is OR. Choice A's inner AND is always false. C and D use the wrong outer operator and let unqualified restaurants through.
Question 12Cybersecurity2021 Practice Exam · Q48
Which of the following is an example of an attack using a rogue access point?
Official Explanation
A is correct. A rogue access point is an insecure/unauthorized wireless access point used to intercept traffic. B is physical sabotage, C is phishing/social engineering, D is a denial-of-service attack.
Question 13Algorithms2021 Practice Exam · Q49
Which of the following best explains the ability to solve problems algorithmically?
Official Explanation
D is correct. An undecidable problem is one for which no algorithm can be constructed that always produces a correct yes-or-no answer for every input. The halting problem is the classic example. A, B, and C all start with the false premise that every problem has an algorithmic solution.
Question 14Cybersecurity2021 Practice Exam · Q50
Which of the following best explains how symmetric encryption algorithms are typically used?
Official Explanation
A is correct. Symmetric means one shared key for both encryption and decryption — and because that one key unlocks the data, it must stay secret. C describes a key system that doesn't really exist. D describes public-key (asymmetric) encryption.
Question 15Impacts2021 Practice Exam · Q51
Which of the following research proposals is most likely to be successful as a citizen science project?
Official Explanation
A is correct. Citizen science relies on distributed, non-expert contributors using their own devices. Photographing local birds fits perfectly. B and D require laboratory or specialized equipment; C is a single simulation, not a distributed effort.
Question 16Algorithms2021 Practice Exam · Q52
A sorted list of numbers contains 128 elements. Which of the following is closest to the maximum number of list elements that can be examined when performing a binary search for a value in the list?
Official Explanation
B is correct. Binary search halves the remaining range each step: 128 → 64 → 32 → 16 → 8 → 4 → 2 → 1 — at most 8 elements examined. (Choice D is what a linear search would require.)
Question 17Pseudocode2021 Practice Exam · Q53
A list of numbers has n elements, indexed from 1 to n. The algorithm below should display true if target appears in the list more than once, and false otherwise. It uses variables position and count. Steps 4 and 5 are missing.
Step 1: Set count to 0 and position to 1.
Step 2:IF the value at index position equals target,
increase count by 1.
Step 3: Increase position by 1.
Step 4: (missing)
Step 5: (missing)
Which of the following correctly replaces steps 4 and 5?
Official Explanation
A is correct. Step 4 must stop when the loop runs past the end of the list (position > n). Step 5 then checks if target was found at least twice (count ≥ 2). B's check (count ≥ position) only triggers when every element matches. C and D have wrong loop conditions that either stop too early or run off the end of the list.
Question 18Pseudocode2021 Practice Exam · Q55
A code segment should transform the list utensils so the last element moves to the beginning.
For example, if utensils initially contains ["fork", "spoon", "tongs", "spatula", "whisk"], it should contain ["whisk", "fork", "spoon", "tongs", "spatula"] afterward. Which code segment transforms the list as intended?
Official Explanation
C is correct. Save the last element to temp, remove it from the end, then INSERT it at index 1. A puts it right back at the end. B and D try to read utensils[len]after removing the last element — index len no longer exists, causing an error.
Question 19Algorithms2021 Practice Exam · Q57
A computer has two identical processors that run in parallel. The table shows execution times of four processes on a single processor. The processes are independent.
Process
Time on Either Processor
P
30 seconds
Q
10 seconds
R
20 seconds
S
15 seconds
Which parallel computing solution would minimize the time to execute all four processes?
Official Explanation
A is correct. With two parallel processors, total time = the longer of the two processor loads. P+Q = 40s, R+S = 35s → finishes in 40s. B: 50 vs 25 = 50s. C: 45 vs 30 = 45s. D: 30 vs 45 = 45s. Balance the load to minimize total time.
Question 20Internet & Apps2021 Practice Exam · Q58
RunRoutr is a fitness app that creates suggested running routes. Each user has a personal profile and a contact list of friends. The app uses the smartphone's GPS to track location, speed, and distance. Users are considered compatible if they're on each other's contact lists or run at similar speeds. At the start of a run, users indicate the distance they want to run, and the app suggests a route from their current location.
Which of the following data must be collected from a user's smartphone in order for RunRoutr to suggest a running route?
Official Explanation
D is correct. The app suggests a route starting from the user's current location, so it needs the user's geographic position — collected from the smartphone's GPS. A is route data (server-side, not from the phone). B and C are unnecessary for suggesting a new route.
Every question on this page is reproduced from the College Board's official 2021 AP Computer Science Principles Practice Exam, and the explanations come directly from the official answer key. None of these questions appear in Practice Set 1.
Mixed MCQ Practice 1
— The first 20-question set, also drawn from the 2021 Practice Exam.