AP® Computer Science Principles Practice Questions
Work through AP Computer Science Principles practice questions unit by unit, then check each answer against a worked solution.
Free · no sign-up Open questions need no account. Sign up or log in to open the rest.
Question 52
Question 53
Question 54
Question 55
A person wants to transmit an audio file from a device to a second device. Which of the following scenarios best demonstrates the use of lossless compression of the original file?
Main Solution
Correct Answer: A
Lossless compression is a method of reducing file size in a way that allows the original data to be perfectly reconstructed from the compressed data. No information is lost in the process.
In option A, the device compresses the audio file (reducing its size) and then the second device restores the compressed file to its original version before playing it. This is the defining characteristic of lossless compression — the original file can be fully recovered from the compressed version.
Why the other options are wrong:
- B: Removing details not easily perceived by the human ear describes lossy compression (e.g., MP3 encoding), where some data is permanently discarded and the original cannot be perfectly reconstructed.
- C: Transmitting the original file and then removing metadata is not compression at all — it is simply editing the file after transmission.
- D: Transmitting the original file without any compression and playing it as-is involves no compression whatsoever.
Teacher Explanation
This question tests students' understanding of the distinction between lossless and lossy compression. Lossless compression preserves all original data and allows perfect reconstruction; lossy compression permanently removes some data to achieve greater size reduction. Students should recognize that the key phrase in option A — "restores the compressed file to its original version" — is the hallmark of lossless compression.
Education Coach Advice
On the AP CSP exam, remember the key distinction: lossless = original can be perfectly restored; lossy = some data is permanently removed. When you see a question about compression, look for the phrase about restoring or reconstructing the original — that signals lossless. If the question mentions removing details or reducing quality, that signals lossy.
Traps
The most common trap is option B. Students may think that compressing an audio file by removing imperceptible details is a form of lossless compression because the human ear cannot detect the difference. However, this describes lossy compression — data is permanently removed and the original file cannot be reconstructed. Lossless compression, by definition, allows full recovery of the original data.
Answer images
Question 56
A student's overall course grade in a certain class is based on the student's scores on individual assignments. The course grade is calculated by dropping the student's lowest individual assignment score and averaging the remaining scores.
For example, if a particular student has individual assignment scores of 85, 75, 90, and 95, the lowest score (75) is dropped. The calculated course grade is (85 + 90 + 95) / 3 = 90.
An administrator at the school has data about hundreds of students in a particular course. While the administrator does not know the values of each student's individual assignment scores, the administrator does have the following information for each student.
- The student name
- A unique student ID number
- The number of assignments for the course
- The average assignment score before the lowest score was dropped
- The course grade after the lowest score was dropped
Which of the following CANNOT be determined from this data alone?
Main Solution
Correct Answer: A
We need to determine which piece of information CANNOT be derived from the available data: student name, student ID, number of assignments (n), average score before dropping the lowest (avg_before), and course grade after dropping the lowest (avg_after).
Analyzing each option:
(B) The value of the lowest assignment score — CAN be determined.
Let \(n\) = number of assignments, \(\bar{x}_{before}\) = average before dropping, \(\bar{x}_{after}\) = course grade (average after dropping).
Total sum of all scores = \(n \cdot \bar{x}_{before}\).
Sum after dropping lowest = \((n-1) \cdot \bar{x}_{after}\).
Therefore, lowest score = \(n \cdot \bar{x}_{before} - (n-1) \cdot \bar{x}_{after}\).
This CAN be calculated.
(C) The change in course grade — CAN be determined.
Change = \(\bar{x}_{after} - \bar{x}_{before}\). Both values are known, so this is straightforward.
(D) The proportion of students who improved — CAN be determined.
For each student, compare \(\bar{x}_{after}\) to \(\bar{x}_{before}\). If \(\bar{x}_{after} > \bar{x}_{before}\), the student improved. We can count how many students improved and divide by total students.
(A) The value of the highest assignment score — CANNOT be determined.
Even knowing the lowest score (from option B's calculation) and the total sum of all scores, we only know the sum of the remaining \(n-1\) scores after removing the lowest. There is no way to isolate the single highest score from the sum of the remaining scores without knowing the individual values. Multiple distributions of scores could yield the same averages, so the highest score is indeterminate.
Therefore, the answer is A.
Teacher Explanation
This question tests students' understanding of what can be mathematically derived from aggregate data. The key insight is that knowing the number of assignments, the pre-drop average, and the post-drop average allows you to compute the sum of all scores and the sum after removing the lowest — which gives you the lowest score by subtraction. However, the remaining \(n-1\) scores are still aggregated, so you cannot isolate any individual score among them, including the highest.
Education Coach Advice
On AP CSP data questions, always ask: 'What can I compute from the given fields?' Work through each answer choice systematically. If you can write a formula using only the available data fields to get the answer, it CAN be determined. If you'd need additional individual-level data not provided, it CANNOT. Eliminate options you can compute before selecting the one you cannot.
Traps
The most common trap is option B. Students may think the lowest score cannot be determined because it was dropped, but it can be recovered algebraically: lowest score = (total sum) − (sum after dropping) = \(n \cdot \bar{x}_{before} - (n-1) \cdot \bar{x}_{after}\). Students who fall for this trap confuse 'dropped from the grade calculation' with 'unknown.' Option A is the correct answer because even with the lowest score known, the remaining scores are still pooled and the highest cannot be isolated.
Answer images
Question 57
Question 58
Question 59
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.

