A programmer writes a function called computeDiscount() that accepts a price and membership tier and returns the discounted amount. The calling code does not know how the discount calculation works — only what inputs to provide and what value is returned. This is an example of which concept?
AProcedural abstraction
BIteration
CData abstraction
DSequencing
ExplanationProcedural abstraction means the caller only needs to know the procedure's interface (name, parameters, return value) — not its implementation. The internal discount logic is hidden. Data abstraction involves organizing data into structures like lists.
A student tests a grade calculator program with the inputs 85, 92, and 74 and gets correct results each time. She submits the program, but it crashes when a teacher enters 0 students. Which statement BEST explains this outcome?
AThe program has a syntax error that only appears at runtime
BTesting can reveal the presence of bugs but cannot prove their absence
CThe program would have passed if tested with more inputs
DA logic error was introduced after the student finished testing
ExplanationTesting verifies behavior for the specific inputs tested — it cannot guarantee correct behavior for ALL possible inputs. The student never tested the edge case of 0 students, so that bug went undetected. This is a fundamental principle of software testing.
A program is designed to recommend movies based on user ratings. During development, a team of five programmers — all with identical backgrounds and movie preferences — designs the recommendation algorithm. What is the most significant risk of this team composition?
AThe program will run more slowly due to more developers
BThe team will produce more syntax errors than a solo developer
CThe algorithm may reflect the shared biases of the team and produce recommendations that exclude certain groups
DThe program cannot be tested adequately without diverse users
ExplanationCollaboration reduces individual bias, but a team with identical backgrounds and preferences shares the same blind spots. Their recommendation algorithm is likely to over-represent their shared tastes and under-represent preferences common in other demographics. This is why diverse teams produce more fair and robust software.
A student writes a program and tests it with five different inputs, all producing correct results. She then adds a new feature, tests only the new feature, and submits. A classmate finds a bug in one of the original features. What development practice would have MOST likely prevented this?
ARegression testing — re-running all previous tests after adding new features
BWriting more detailed documentation before coding
CUsing incremental development instead of iterative
DPair programming while adding the new feature
ExplanationRegression testing means re-running the full test suite after any change to ensure new code did not break existing functionality. The student only tested the new feature, which is why the existing bug went undetected. This is a standard professional software development practice.
Which of the following BEST describes the difference between a program's PURPOSE and its FUNCTION?
APurpose explains why the program exists (the problem it solves); function describes what it does mechanically
BPurpose describes the inputs; function describes the outputs
CPurpose is documented by comments; function is documented by the code itself
DPurpose is set by the programmer; function is determined by the user
ExplanationPurpose answers 'why does this program exist?' — the problem it addresses or value it provides. Function answers 'what does it actually do?' — the specific behaviors and transformations. The Create Task rubric scores these separately because they are distinct concepts.
A program that manages a hospital's patient records stores all patient information in a structure called PatientRecord. Other parts of the program work with PatientRecord objects without knowing how the data is internally stored. This is an example of:
AProcedural abstraction
BIteration
CData abstraction
DSequential execution
ExplanationData abstraction means organizing data into a structure (here PatientRecord) and working with that structure without knowing its internal implementation. This is distinct from procedural abstraction, which hides the implementation of a procedure. Both are forms of abstraction that manage complexity.
A student is asked to identify the type of error in the following situation: A program compiles and runs without crashing, but when asked to find the largest number in a list, it always returns the FIRST number instead of the largest. What type of error is this?
ASyntax error
BRuntime error
CCompilation error
DLogic error
ExplanationA logic error occurs when a program runs without crashing but produces incorrect results due to a flaw in the algorithm. The program correctly finds and returns a number — it just uses the wrong algorithm (returning first instead of finding maximum). Syntax errors prevent compilation; runtime errors crash the program during execution.
A software team is reviewing their testing plan. They have tested: (I) typical valid inputs, (II) maximum possible input values, (III) minimum possible input values, (IV) invalid inputs that should trigger error handling. Which of the following BEST describes the completeness of their testing?
AOnly I and IV are necessary — boundary tests are redundant
BTesting all four categories is good practice but still cannot guarantee the absence of bugs
CThe plan tests inputs but cannot verify that the program terminates correctly
DThe plan is complete because all four categories are covered
ExplanationEven comprehensive testing across all input categories (valid, boundary, invalid) cannot prove a program is bug-free. Testing verifies behavior for tested inputs only. There are infinitely many possible input combinations; a bug might exist for an untested combination. This is a fundamental theorem of software testing.
How many distinct values can be represented using exactly 6 bits?
ExplanationWith n bits, you can represent 2^n distinct values. With 6 bits: 2^6 = 64. Each additional bit doubles the number of representable values: 1 bit=2, 2 bits=4, 3 bits=8, 4 bits=16, 5 bits=32, 6 bits=64.
What is the decimal value of the binary number 10110?
ExplanationConvert each bit position: 10110 = (1x16) + (0x8) + (1x4) + (1x2) + (0x1) = 16 + 0 + 4 + 2 + 0 = 22. Remember: binary positions are powers of 2 starting from the right (1, 2, 4, 8, 16...).
A photographer stores images in JPEG format to save disk space. She later wants to restore the original uncompressed image from the JPEG file. Which statement is correct?
AThe original can be restored because JPEG uses lossless compression
BThe original cannot be restored because JPEG permanently discards data
CThe original can be restored if the original file size is known
DThe original can be restored using a decompression algorithm
ExplanationJPEG uses lossy compression, which permanently discards data to achieve smaller file sizes. Once an image is saved as JPEG, the discarded data is gone forever — no algorithm can reconstruct it. This is the fundamental distinction from lossless formats like PNG, which CAN be perfectly reconstructed.
A government agency collects only the metadata from all phone calls made in a country: who called whom, when, and for how long — but NOT the actual content of conversations. A civil liberties group argues this still violates privacy. Which argument BEST supports their position?
AMetadata is more important than content because it is stored permanently
BCall duration metadata reveals the quality of relationships between people
CMetadata patterns — who you call, when, and how often — can reveal political affiliations, medical conditions, and personal relationships without any content
DMetadata collection is only a privacy violation if the data is ever accessed
ExplanationMetadata — even without content — can reveal deeply private information. Patterns of calls to a psychiatrist, cancer specialist, or political organizer reveal sensitive information about a person's life. Researchers have demonstrated that call metadata alone can identify medical conditions and political beliefs with high accuracy.
A data scientist notices that cities with more hospitals have higher death rates. She concludes that hospitals cause deaths and recommends closing hospitals. What is wrong with this reasoning?
AThe sample size of hospitals is too small to draw conclusions
BDeath rate data cannot be collected accurately from hospitals
CCorrelation between two variables always requires additional data before any conclusion can be drawn
DThe correlation is caused by a confounding variable: sick people go to cities with more hospitals
ExplanationThis is the classic confounding variable problem. Cities have more hospitals BECAUSE they have more sick people. The hospitals are responding to illness, not causing death. The variable 'population illness burden' explains both the number of hospitals and the death rate. Correlation does not imply causation.
A 3-bit color system can represent 8 colors. A designer needs a system that can represent at least 1,000 distinct colors. What is the MINIMUM number of bits required?
ExplanationWith n bits you get 2^n values. 2^9 = 512 (not enough). 2^10 = 1024 (enough). So 10 bits is the minimum needed to represent at least 1,000 distinct colors.
A program stores ages as whole numbers using only 8 bits (unsigned). What happens when the program tries to store the value 256?
AThe value is stored correctly as 256
BThe value is rounded down to 255
CAn overflow error occurs because 256 cannot be represented in 8 bits
DThe program automatically switches to 16-bit storage
Explanation8 unsigned bits can store values from 0 to 255 (2^8 - 1 = 255). The value 256 requires 9 bits. When a value exceeds the maximum representable value, an overflow error occurs.
A sound engineer records audio at a sampling rate of 44,100 samples per second. She then re-records the same audio at 22,050 samples per second. Which statement BEST describes the difference?
AThe second recording has higher quality because fewer samples reduce noise
BThe second recording has a smaller file size but identical audio quality
CThe two recordings are identical because they sample the same sound wave
DThe second recording loses some audio frequency information because fewer samples capture less detail
ExplanationSampling converts analog audio to digital by measuring the signal at regular intervals. A higher sampling rate captures more detail. At 22,050 samples/second (half of 44,100), the digital representation captures less detail about rapid changes in the audio waveform, potentially losing high-frequency content.
An online store records the following data for each purchase: item name, quantity, price, customer ID, timestamp, device type, and IP address. A customer claims this data is not personally identifiable. Which response is MOST accurate?
AThe customer is correct because no single field directly identifies them
BThe customer is correct because IP addresses are not considered PII
CThe customer is incorrect because combining these fields can uniquely identify an individual even without a name
DThe customer is incorrect because price and quantity are always considered PII
ExplanationPII does not require a single field to identify someone. The combination of purchase timestamp + device type + IP address + customer ID can uniquely identify a specific individual with high certainty. This is why data privacy laws consider aggregated data that can identify individuals to be PII.
Which of the following BEST describes what happens when a survey about political opinions is conducted only on social media platforms frequented by young people?
AThe survey results will be accurate because social media reaches a large number of people
BThe survey data will need to be cleaned but will otherwise be unbiased
CThe survey will be valid as long as more than 1,000 people respond
DThe survey will underrepresent older demographics, creating a biased sample
ExplanationSampling bias occurs when the sample is not representative of the population being studied. Conducting a political survey only on young-person-dominated social media platforms excludes older voters, rural populations, and those without social media access.
A data visualization shows ice cream sales and drowning rates both rising in summer months. A student concludes that ice cream causes drownings. Which of the following identifies ALL problems with this conclusion?
AThe sample size is too small and the time period is too short
BCorrelation is being mistaken for causation, and a confounding variable (hot weather) explains both
CThe data has not been cleaned properly, causing false correlations
DDrowning rates cannot be accurately measured and the data is unreliable
ExplanationHot weather causes both increased ice cream sales AND more swimming/water activity, which increases drowning risk. The two variables are correlated because of the confounding variable (temperature/season), not because one causes the other.
A digital image uses 24 bits per pixel (8 bits each for red, green, and blue). How many possible color values does this represent?
A24
B256
C16,777,216
D4,294,967,296
ExplanationWith 24 bits total (8 bits x 3 channels), there are 2^24 = 16,777,216 (approximately 16.7 million) possible color combinations. Each channel has 2^8 = 256 values (0-255), and there are 256 x 256 x 256 = 16,777,216 total combinations.
Which of the following BEST explains why lossless compression is required for text documents but lossy compression is acceptable for music files?
AAny change to a text character alters meaning, while humans cannot perceive small reductions in audio quality
BText files are always smaller than music files so lossless compression is faster
CMusic files cannot be compressed using lossless algorithms
DText documents are more important than music files so they deserve better compression
ExplanationIn text, every character has precise meaning — changing a single character in a legal document or code file could completely change its meaning or break functionality. No loss is acceptable. In music, the human auditory system cannot distinguish certain high-frequency details that lossy compression removes.
What is the output of the following pseudocode?
x ← 4
y ← x + 3
x ← y * 2
y ← x - 1
DISPLAY(y)
ExplanationTrace step by step: x=4; y=4+3=7; x=7*2=14; y=14-1=13. DISPLAY(y) outputs 13. The key trap is that x changes to 14 before y is updated, so y gets 14-1=13, not 7-1=6.
What value does the following pseudocode display?
nums ← [8, 3, 7, 1, 5]
DISPLAY(nums[3])
ExplanationAP CSP lists are 1-indexed. nums[1]=8, nums[2]=3, nums[3]=7, nums[4]=1, nums[5]=5. Therefore nums[3] = 7. This is the most common BI3 trap — students used to Java or Python think nums[3] is the 4th element, but in AP pseudocode it is the 3rd element.
What is the output of the following pseudocode?
total ← 0
count ← 1
REPEAT UNTIL (count > 4)
{
total ← total + count
count ← count + 1
}
DISPLAY(total)
ExplanationTrace: total=0, count=1. Iteration 1: total=0+1=1, count=2. Iteration 2: total=1+2=3, count=3. Iteration 3: total=3+3=6, count=4. Iteration 4: total=6+4=10, count=5. 5>4? YES — stop. DISPLAY(10). The loop sums 1+2+3+4=10.
A programmer writes the following pseudocode to find if any number in a list is negative. What does it output when called with the list [3, 7, -2, 5]?
PROCEDURE hasNegative(numList)
{
FOR EACH n IN numList
{
IF (n < 0)
{
RETURN(TRUE)
}
}
RETURN(FALSE)
}
ATRUE
BFALSE
C-2
DThe procedure has no output because it uses RETURN not DISPLAY
ExplanationThe procedure iterates through [3, 7, -2, 5]. When n=-2, the condition n<0 is TRUE, so RETURN(TRUE) executes immediately — the loop stops and TRUE is returned.
What is the value of result after the following pseudocode executes?
myList ← [10, 20, 30, 40, 50]
INSERT(myList, 2, 15)
result ← myList[3]
ExplanationStart: myList = [10, 20, 30, 40, 50]. INSERT(myList, 2, 15) inserts 15 at index 2, shifting everything at index 2+ right. After INSERT: myList = [10, 15, 20, 30, 40, 50]. myList[3] = 20.
Which of the following pseudocode segments correctly computes the number of even numbers in a list?
AREPEAT LENGTH(nums) TIMES { IF (nums MOD 2 = 0) { count ← count + 1 } }
BFOR EACH n IN nums { IF (n / 2 = 0) { count ← count + 1 } }
CFOR EACH n IN nums { IF (n MOD 2 = 0) { count ← count + 1 } }
DFOR EACH n IN nums { count ← n MOD 2 }
ExplanationOption C: FOR EACH iterates over each element n, and n MOD 2 = 0 is the correct test for even numbers. Option A applies MOD to the whole list. Option B uses division not MOD. Option D replaces count with the MOD result each time.
What is displayed after the following pseudocode executes?
nums ← [5, 3, 8, 1, 9]
max ← nums[1]
FOR EACH n IN nums
{
IF (n > max)
{
max ← n
}
}
DISPLAY(max)
ExplanationInitialize max=nums[1]=5. Iterate: n=5, 5>5? No. n=3, 3>5? No. n=8, 8>5? Yes — max=8. n=1, 1>8? No. n=9, 9>8? Yes — max=9. DISPLAY(9).
In AP CSP pseudocode, which of the following is TRUE about REPEAT UNTIL?
AThe loop body always executes at least once before the condition is checked
BThe loop body executes WHILE the condition is TRUE
CThe condition is checked BEFORE the first iteration
DREPEAT UNTIL and REPEAT N TIMES produce identical results
ExplanationREPEAT UNTIL checks its condition AFTER executing the loop body. This means the loop body always runs at least once, even if the exit condition is already true at the start. This is the opposite of a WHILE loop, which checks the condition BEFORE the first iteration.
A sorted list has 1,024 elements. In the WORST case, how many comparisons does binary search need to find a target (or determine it is absent)?
ExplanationBinary search halves the search space with each comparison. Starting with 1,024 elements: 1024 > 512 > 256 > 128 > 64 > 32 > 16 > 8 > 4 > 2 > 1. That is 10 halvings. log2(1024) = 10.
A programmer modifies each element of a list inside a FOR EACH loop: FOR EACH item IN scores { item ← item + 10 } After this code runs, what is true about the list scores?
Ascores is unchanged because item is a temporary copy, not a reference to the list element
BEach element in scores has been increased by 10
CAn error occurs because you cannot modify variables inside FOR EACH loops
DOnly the last element of scores is increased by 10
ExplanationIn AP CSP pseudocode, the FOR EACH loop variable (item) is a TEMPORARY COPY of each element — modifying it does NOT modify the original list. To actually modify the list, you would need to use an index-based loop. This is one of the most common FOR EACH misconceptions on the AP exam.
Which of the following pseudocode segments correctly reverses a list without using a built-in reverse procedure? Assume the list has 4 elements.
AFOR EACH x IN myList { REMOVE(myList, 1) }
Btemp ← myList[1]
myList[1] ← myList[4]
myList[4] ← temp
temp ← myList[2]
myList[2] ← myList[3]
myList[3] ← temp
CmyList ← myList[4] + myList[3] + myList[2] + myList[1]
DFOR EACH x IN myList { INSERT(myList, 1, x) }
ExplanationOption B correctly swaps the outer pair (index 1 and 4) then the inner pair (index 2 and 3) using a temp variable. This is the standard in-place reversal algorithm.
What does the following procedure return when called with the argument 7?
PROCEDURE mystery(n)
{
result ← 0
REPEAT UNTIL (n <= 0)
{
result ← result + n
n ← n - 2
}
RETURN(result)
}
ExplanationTrace with n=7: result=0. n=7: result=0+7=7, n=5. n=5: result=7+5=12, n=3. n=3: result=12+3=15, n=1. n=1: result=15+1=16, n=-1. -1<=0? YES — stop. RETURN(16). The function sums 7+5+3+1=16.
Which of the following is NOT a valid reason to use a heuristic algorithm instead of an exact algorithm?
AThe exact algorithm requires exponential time, making it impractical for large inputs
BA good-enough solution found quickly is more useful than the optimal solution found too slowly
CThe problem has many possible inputs and testing all of them is infeasible
DA heuristic always produces a result that is mathematically proven to be optimal
ExplanationHeuristics are used precisely BECAUSE they do NOT guarantee an optimal solution. They find good-enough solutions much faster than exact algorithms. If an algorithm is proven to produce the optimal result, it is an exact algorithm, not a heuristic.
Which of the following describes the HALTING PROBLEM?
AA problem that takes too long to solve on current hardware but will be solvable on faster computers
BA problem for which no algorithm can determine for ALL possible programs whether they will finish or run forever
CA problem that can only be solved with parallel computing
DA loop that never terminates due to a programming error
ExplanationThe Halting Problem is the canonical undecidable problem: there is no algorithm that can correctly determine, for EVERY possible program and input, whether that program will eventually halt or run forever. This was proven by Alan Turing — it is not a hardware limitation.
A programmer writes this procedure to find the index of a target in a list. What is wrong?
PROCEDURE findIndex(myList, target)
{
i ← 0
REPEAT UNTIL (i > LENGTH(myList))
{
IF (myList[i] = target)
{
RETURN(i)
}
i ← i + 1
}
RETURN(-1)
}
AThe procedure should use FOR EACH instead of REPEAT UNTIL
BRETURN(-1) is not valid AP CSP syntax
CThe condition should be i >= LENGTH(myList) not i > LENGTH(myList)
Di starts at 0 but AP CSP lists are 1-indexed, so myList[0] is invalid
ExplanationAP CSP lists are 1-indexed. The first valid index is 1, not 0. Starting i at 0 means the first iteration attempts to access myList[0], which does not exist and would cause an error. The fix is to initialize i ← 1.
What is the output of the following nested loop pseudocode?
count ← 0
i ← 1
REPEAT 3 TIMES
{
j ← 1
REPEAT 4 TIMES
{
count ← count + 1
j ← j + 1
}
i ← i + 1
}
DISPLAY(count)
ExplanationThe outer loop runs 3 times. The inner loop runs 4 times for each outer iteration. Total: 3 x 4 = 12. count increments once per inner iteration, so count = 12.
Which of the following algorithms has UNREASONABLE time complexity for large inputs?
AAn algorithm that makes 2n comparisons for n elements
BAn algorithm that makes 2^n comparisons for n elements
CAn algorithm that makes n^2 comparisons for n elements
DAn algorithm that makes n x log(n) comparisons for n elements
ExplanationAn algorithm with 2^n (exponential) time complexity grows unreasonably fast. For n=50: about 1 quadrillion steps. Polynomial time algorithms (n, n^2, n x log n) are considered reasonable. Exponential time (2^n, n!) is unreasonable for large inputs.
What is the output of the following pseudocode?
values ← [3, 1, 4, 1, 5]
REMOVE(values, 2)
DISPLAY(LENGTH(values))
DISPLAY(values[3])
A5 and 4
B4 and 4
C4 and 1
D5 and 1
ExplanationStart: values = [3, 1, 4, 1, 5]. REMOVE(values, 2) removes the element at index 2 (value 1). After removal: values = [3, 4, 1, 5]. LENGTH = 4. values[3] = 1. Outputs: 4 then 1.
What is the output of this pseudocode?
PROCEDURE double(x)
{
x ← x * 2
DISPLAY(x)
}
value ← 5
double(value)
DISPLAY(value)
A10 then 10
B10 then 5
C5 then 10
D5 then 5
ExplanationWhen double(value) is called with value=5, parameter x receives a COPY of 5. Inside the procedure, x=5*2=10, then DISPLAY(10). However, modifying x inside the procedure does NOT change value in the calling code. After the procedure returns, DISPLAY(value) still displays 5. Output: 10 then 5.
An algorithm runs in 200 seconds on one processor. The algorithm consists of a section that MUST run sequentially taking 50 seconds, and a section that can be parallelized taking 150 seconds. If 5 processors are used for the parallel section, what is the approximate minimum total run time?
A40 seconds
B100 seconds
C80 seconds
D150 seconds
ExplanationThe sequential section (50s) cannot be parallelized. The parallel section (150s) splits across 5 processors: 150/5 = 30 seconds. Total: 50 + 30 = 80 seconds. Adding more processors provides diminishing returns — the sequential portion creates a hard lower bound.
Which of the following is TRUE about an undecidable problem?
AIt can be solved but requires a very powerful computer
BNo algorithm can correctly solve all instances of the problem
CIt can be solved by parallel computing but not sequential computing
DIt has no known solution but may be solved by future algorithms
ExplanationAn undecidable problem is one for which it is MATHEMATICALLY PROVEN that no algorithm can produce a correct yes/no answer for all possible inputs. This is not a hardware limitation. The Halting Problem is the canonical example. These problems will remain unsolvable regardless of future advances.
A programmer defines: PROCEDURE addToList(lst, val) { APPEND(lst, val) }. After calling addToList(myList, 99), the programmer checks myList and finds 99 was NOT added. What is the most likely explanation in AP CSP pseudocode?
AAPPEND requires the list to be initialized with at least one element first
B99 is an invalid list value because lists can only store strings
CaddToList has a logic error because it should use INSERT not APPEND
DThe procedure parameter lst receives a copy; modifying it does not affect myList
ExplanationIn AP CSP pseudocode, procedure parameters receive copies of the arguments. When addToList is called with myList, the parameter lst gets a copy. APPEND modifies that copy inside the procedure, but the original myList in the calling code is unchanged.
What is the output of this pseudocode?
n ← 1
result ← 1
REPEAT UNTIL (n > 5)
{
result ← result * n
n ← n + 1
}
DISPLAY(result)
ExplanationTrace: n=1, result=1. result=1*1=1, n=2. result=1*2=2, n=3. result=2*3=6, n=4. result=6*4=24, n=5. result=24*5=120, n=6. 6>5? YES. DISPLAY(120). This computes 5! = 120.
A student asks: 'If the internet is down, can I still access the World Wide Web?' What is the CORRECT answer?
ANo, the web is an application that runs on top of the internet and requires it to function
BYes, the web has its own separate infrastructure
CYes, as long as DNS servers are still running
DNo, the internet and web are the same thing
ExplanationThe World Wide Web is an application layer service that runs ON TOP of the internet infrastructure. The web uses HTTP/HTTPS to transfer hyperlinked documents between web browsers and web servers. If the underlying internet infrastructure is unavailable, web browsers cannot communicate with web servers.
In TCP/IP communication, what is the specific role of IP (Internet Protocol)?
AEnsuring that all packets arrive at the destination in the correct order
BEncrypting data so it cannot be read during transmission
CAssigning addresses to devices and determining how packets are routed from source to destination
DBreaking data into packets and reassembling them at the destination
ExplanationIP handles addressing (each device gets a unique IP address) and routing (determining the path packets take through the network). TCP handles reliability — ensuring packets arrive in order and retransmitting lost packets.
A network diagram shows 6 computers connected as follows: A connects to B and C; B connects to A, D, and E; C connects to A and F; D connects to B; E connects to B and F; F connects to C and E. If the connection between B and E fails, can A still communicate with E?
ANo — E can only be reached through B
BYes — through the path A > B > D > E
CNo — F is only connected to C, not E
DYes — through the path A > C > F > E
ExplanationAfter B-E fails, trace available paths from A to E: A>B>E (blocked). A>C>F>E — F connects to E, so this path works. This demonstrates fault tolerance through redundant paths.
A task can be split into 4 subtasks. Subtasks 1, 2, and 3 can run simultaneously on separate processors. Subtask 4 MUST wait for all three to finish before it can begin, and takes as long as subtasks 1, 2, and 3 combined. If each of subtasks 1-3 takes 10 seconds, what is the minimum time to complete the entire task using 3 processors?
A40 seconds
B20 seconds
C30 seconds
D10 seconds
ExplanationSubtasks 1, 2, and 3 each take 10 seconds and run in parallel: total 10 seconds wall-clock time. Subtask 4 takes 10+10+10 = 30 seconds and must run after them. Total: 10 + 30 = 40 seconds.
What is the PRIMARY advantage of packet switching over circuit switching for internet communication?
APacket switching is faster for every individual transmission
BPacket switching allows multiple communications to share the same physical path, making networks more efficient
CPacket switching guarantees that all packets arrive in order
DPacket switching uses less total bandwidth than circuit switching
ExplanationIn circuit switching, a dedicated path is reserved for an entire conversation. In packet switching, the physical network infrastructure is shared by many simultaneous communications, with packets from different sources interleaved. This makes much more efficient use of network capacity.
A website uses HTTPS instead of HTTP. What protection does this provide that HTTP does NOT?
AHTTPS loads pages faster because it compresses data
BHTTPS prevents the website from being hacked
CHTTPS encrypts data in transit so eavesdroppers cannot read the communication
DHTTPS ensures the website content is accurate and unbiased
ExplanationHTTPS adds TLS encryption to HTTP. This protects data in transit — an eavesdropper monitoring network traffic sees only encrypted data and cannot read passwords, credit card numbers, or other sensitive content.
A user types 'www.apcsexamprep.com' into their browser. Before the browser can connect, which component must translate this name into a numerical IP address?
ATCP
BHTTP
CThe router
DDNS
ExplanationDNS (Domain Name System) translates human-readable domain names into numerical IP addresses that routers can use to route traffic. TCP handles reliable delivery; HTTP is the web protocol; routers direct packets but do not translate domain names.
Which of the following BEST describes the difference between bandwidth and latency?
ABandwidth is measured in milliseconds; latency is measured in megabits per second
BBandwidth is the maximum data rate of a connection; latency is the time delay for data to travel from sender to receiver
CBandwidth refers to wireless connections; latency refers to wired connections
DBandwidth measures download speed; latency measures upload speed
ExplanationBandwidth = how much data can flow per unit of time (capacity), measured in bits per second. Latency = the time delay for a single packet to travel from sender to receiver, measured in milliseconds.
Email, web browsing, and video streaming all run on the internet. Which statement BEST explains why they can all coexist on the same network infrastructure?
AEach service uses a dedicated section of the internet's physical cables
BOpen protocols allow any application to use the shared infrastructure by following standard rules for addressing and routing
CThey use different packet sizes to avoid collisions
DInternet service providers assign separate bandwidth pools for each type of service
ExplanationThe internet's power comes from open, standardized protocols (TCP/IP) that allow any application to communicate over the shared infrastructure by following the same rules. No application needs dedicated physical infrastructure — they share through protocol standardization.
Which of the following is NOT considered personally identifiable information (PII) on its own?
ASocial Security Number
BHome address
CFavorite color
DEmail address
ExplanationPII is information that can be used to identify a specific individual. Social Security Numbers, home addresses, and email addresses can all identify a specific person. Favorite color cannot — millions of people share the same favorite color.
A user enables the 'Do Not Track' setting on their browser. A website continues to track the user's behavior through cookies anyway. Which of the following BEST describes this situation?
AThis is technically impossible — browser settings always prevent tracking
BThis only occurs because the user's antivirus software is blocking the Do Not Track signal
CThe website is required by law to honor Do Not Track requests in all countries
D'Do Not Track' is a request to websites, not a technical block — websites can ignore it
ExplanationThe 'Do Not Track' browser setting sends a request header asking websites not to track user behavior. However, it is merely a request — not a technical barrier and not legally mandated in most jurisdictions.
A facial recognition system is trained on a dataset that is 90% photos of light-skinned faces. The system is then deployed nationally. What is the MOST likely outcome?
AThe system will be less accurate for darker-skinned faces due to underrepresentation in training data
BThe system will perform equally well on all skin tones because computers do not have racial bias
CThe system will be more accurate for darker-skinned faces because less data means the algorithm focuses more carefully
DThe accuracy difference will be negligible because 10% of the dataset is sufficient for any demographic
ExplanationMachine learning systems learn patterns from their training data. When a demographic is underrepresented, the system develops less accurate pattern recognition for that group. Real facial recognition systems have shown significantly higher error rates for underrepresented demographics.
Which of the following BEST describes copyright protection?
ACopyright automatically protects original creative works from the moment of creation
BCopyright must be formally registered with the government before it takes effect
CCopyright applies only to published works that display the copyright symbol
DCopyright protects ideas, facts, and concepts from being used by others
ExplanationCopyright protection is automatic — it applies to original creative works the moment they are created and fixed in a tangible form. Registration is not required. Crucially, copyright protects the EXPRESSION of ideas, NOT the underlying ideas, facts, or concepts themselves.
A developer releases code under a Creative Commons Attribution license (CC BY). Which of the following can others do with this code?
AView the code but not copy or distribute it
BUse it only for non-commercial purposes with attribution
CUse it freely for any purpose including commercial use, as long as they credit the original author
DUse it only if they release their own code under the same license
ExplanationCC BY is the most permissive Creative Commons license — it allows others to share, adapt, and use the work for ANY purpose (including commercially) as long as they give appropriate credit. Non-commercial restrictions require CC BY-NC. Requiring the same license requires CC BY-SA.
Which of the following MOST accurately describes the difference between open source software and public domain software?
AOpen source software is copyrighted with a license specifying permitted uses; public domain software has no copyright restrictions
BOpen source software has no copyright; public domain software may still have copyright
COpen source software can only be used by developers; public domain software can be used by anyone
DThere is no meaningful difference — both can be used freely by anyone for any purpose
ExplanationOpen source software is copyrighted by its creator but distributed under a license (GPL, MIT, Apache, etc.) that permits viewing, modifying, and distributing the source code under specified conditions. Public domain software has NO copyright — it can be used with absolutely no restrictions.
A recommendation algorithm on a news platform shows users content similar to what they have previously clicked. Over time, users report seeing only news that confirms their existing views. Which phenomenon does this describe?
ADistributed computing
BA filter bubble created by personalization algorithms
CAlgorithmic bias due to biased training data
DA denial of service attack on the news platform
ExplanationA filter bubble occurs when personalization algorithms show users content matching their existing preferences and click patterns. Over time, users see less diverse perspectives and more confirmation of existing views, creating an echo chamber.
A city installs free public WiFi throughout the downtown area. Residents in wealthy neighborhoods already have high-speed home internet, while low-income neighborhoods near downtown now gain internet access. However, rural residents 30 miles away remain without internet access. This initiative BEST demonstrates which concept?
AIt eliminates the digital divide by providing universal internet access
BIt creates a new digital divide between downtown and suburban residents
CIt reduces the digital divide for nearby residents but may widen the gap between urban and rural populations
DPublic WiFi does not count as internet access for purposes of the digital divide
ExplanationTechnology interventions can reduce the gap for some groups while leaving others behind or even widening certain disparities. This is why impact analysis must consider ALL affected populations.
Which of the following is an example of a computing innovation having BOTH a beneficial AND a harmful effect?
AA calculator app that performs arithmetic — beneficial only
BOpen source software released for free — beneficial only
CA bug in a program that causes it to display wrong answers — harmful only
DSocial media platforms that connect people globally AND enable coordinated harassment campaigns
ExplanationThe AP exam frequently presents scenarios where the same innovation causes both benefits and harms. Social media enables global communication (beneficial) while also enabling harassment and misinformation (harmful). Students must evaluate for BOTH impacts.
A hacker sends an email appearing to be from a user's bank, claiming the account will be closed unless the user clicks a link and enters their password. The user enters their credentials on the fake website. What type of attack is this?
APhishing attack
BOverflow attack
CSymmetric encryption attack
DDistributed denial of service (DDoS) attack
ExplanationPhishing is a social engineering attack that uses deceptive emails, websites, or messages to trick users into revealing credentials or sensitive information. The human — not the computer system — is being manipulated.
Which of the following actions does multi-factor authentication (MFA) MOST effectively protect against?
AA hacker who has physical access to the user's device
BA hacker who has obtained the user's password through a data breach
CA hacker who is eavesdropping on the user's network connection
DA hacker who has infected the user's device with malware
ExplanationMFA requires multiple forms of verification. Even if a hacker obtains your password from a data breach, they cannot log in without the second factor (e.g., a code sent to your phone).
A programmer writes an app to help users find local food banks. The app also collects and sells users' GPS location data to advertisers. Which of the following BEST describes this situation?
AThis is acceptable because the app provides a valuable service
BGPS location is not PII so there is no privacy concern
CThe sale of location data is an intended feature that users should be aware of but may not know about
DThis is an unintended negative consequence of computing innovation
ExplanationThe data collection and sale is clearly intentional (a business decision), not an unintended consequence. The ethical issue is transparency and informed consent: users seeking help finding food may not realize their precise location data is being sold.
A social media platform changes its algorithm to show users more emotionally provocative content because it generates more clicks and engagement. Research later shows this change increased anxiety and political polarization among users. This is BEST described as:
AAn intended consequence that the company knowingly accepted
BAlgorithmic bias caused by underrepresentation in training data
CAn unintended consequence of optimizing for engagement metrics without fully considering human impact
DA copyright violation because the emotionally provocative content was protected
ExplanationThe company intended to increase engagement (successfully achieved). The anxiety and polarization were NOT intended — they are side effects of optimizing for a narrow metric without considering broader human wellbeing.
Which of the following actions by a programmer BEST demonstrates ethical responsibility?
AWriting the most efficient algorithm possible regardless of its application
BConsidering potential harms to various groups before deploying a system and modifying the design if significant harms are identified
COnly working on projects that have no possibility of harmful use
DReleasing all code as open source so the community can identify problems
ExplanationEthical responsibility means proactively considering potential impacts — including harms — and making design choices to minimize harm. Option C is impractical. Option D, while valuable, does not itself address ethical concerns before deployment.
A government makes all public transit data openly available as structured data that developers can freely use. A startup uses this data to build a real-time bus tracking app that charges users $2/month. Which principle does the government's data release BEST demonstrate?
ASymmetric encryption of sensitive transit information
BCreative Commons licensing of government intellectual property
CCrowdsourcing public transit data from citizen scientists
DOpen access to publicly funded data enabling innovation and economic value creation
ExplanationOpen access to publicly funded data enables entrepreneurs and developers to build value-added services without needing to collect the underlying data themselves. This is a key principle behind government data transparency initiatives.
Training a large AI language model requires significant computational resources running for weeks or months. Which environmental concern does this MOST directly raise?
AThe electricity consumed by data centers training AI models contributes to carbon emissions
BAI models produce physical waste that must be disposed of
CAI training requires rare earth minerals that deplete natural resources rapidly
DAI models increase the amount of data stored, filling up physical hard drives
ExplanationData centers running AI training workloads consume enormous amounts of electricity. Depending on the energy source, this can produce significant carbon emissions. This is an increasingly important unintended environmental consequence of AI development.
Which combination of factors MOST effectively reduces algorithmic bias in a machine learning system?
AUsing a faster computer and more recent programming language
BHaving the algorithm tested by the same team that built it before deployment
CIncreasing the number of training data points regardless of their composition
DEnsuring diverse and representative training data AND using diverse development teams to identify blind spots
ExplanationReducing algorithmic bias requires addressing it at multiple levels: diverse training data ensures all groups are well-represented, and diverse development teams bring different perspectives to notice when an algorithm performs poorly for certain groups. Both are necessary.