AP Computer Science Principles common mistakes
AP Computer Science Principles · Understand the traps and how to avoid them.
When asked to identify the value stored in a variable after a loop, the candidate traces only the first and last iteration and reports the final assignment rather than the accumulated or final computed value.
Loops with many iterations feel tedious to trace fully, so candidates sample endpoints and assume the middle behaves the same, missing off-by-one boundaries and accumulation effects.
What to do instead
Build a small trace table with one row per iteration showing each variable's value, and stop only when the loop condition fails; verify the boundary iteration explicitly.
The candidate describes what a program does in vague terms ('it sorts the list') instead of naming the specific algorithm pattern (linear search, binary search, sequential sum) and the exact output for a given input.
The exam asks students to explain purpose and correctness; students default to high-level summaries because they recognize the code's shape without committing to precise behavior.
What to do instead
Practice writing one-sentence purpose statements that name the pattern and the input-to-output mapping, then test them against a concrete input by hand.
The candidate treats binary search as usable on any list and ignores the required precondition that the data be sorted, or claims linear search is always slower on every input size.
Students memorize that binary search is 'faster' without internalizing the sorted precondition or the cost tradeoffs, and exam distractors exploit exactly that shortcut.
What to do instead
For every search question, first state whether the list is sorted; then compare worst-case comparisons for both algorithms on the stated size before choosing.
The candidate confuses procedure calls with procedure definitions, or fails to trace parameter passing and return values across nested calls, reporting the wrong returned value.
Students read the procedure body as if it executes at definition time and lose track of which arguments bind to which parameters when calls nest.
What to do instead
Annotate each call site with the argument values, substitute them into the parameter names inside the body, and compute the return value bottom-up before moving to the caller.
The candidate states that a program's data is compressed or encrypted without distinguishing lossless from lossy compression, or claims encryption reduces file size.
Everyday usage of 'compress' and 'secure' blurs the technical distinction, and students apply a generic 'makes it smaller/safer' intuition.
What to do instead
Memorize the one-line test: lossless preserves exact reconstruction, lossy discards detail irreversibly, encryption changes readability not size; classify each scenario against those tests.
The candidate reads a data table or metadata description and reports a correlation or trend as a causal claim, or ignores missing/ambiguous values when summarizing the dataset.
Tables invite pattern-spotting, and students conflate 'these move together' with 'this causes that' while skipping rows that are blank or coded oddly.
What to do instead
Before answering, list what each field records and flag any null or outlier entries; phrase conclusions as associations and explicitly note what the data cannot establish.
The candidate explains that the internet routes packets along a single fixed path, or that a URL is resolved to an IP address without involving DNS, and misorders the request/response layers.
Diagrams of 'the internet' as one wire encourage a mental model of a dedicated circuit, and layer names (HTTP, TCP/IP, DNS) get memorized as a list rather than a sequence.
What to do instead
Rehearse one end-to-end narrative (browser to DNS to server to response) and state that packets may take different routes and arrive out of order, reassembled by the protocol.
The candidate treats a fault-tolerant or redundant system as immune to all failure, or claims that adding redundancy removes the need for error checking and retransmission.
Students equate 'backup exists' with 'nothing can go wrong' and overlook that redundancy handles some failures (hardware loss) but not others (corrupted data, simultaneous failure).
What to do instead
For each scenario, name the specific failure being guarded against and whether the mechanism detects it, recovers from it, or neither; reject 'always safe' answers.
The candidate answers an impact question with a blanket judgment ('technology is good/bad') instead of naming a specific benefit and a specific harm with the affected group.
Impact prompts feel like opinion questions, so students give general verdicts rather than the concrete, stakeholder-specific analysis the rubric rewards.
What to do instead
Structure every response as: named group, concrete benefit, concrete harm, and one factor (access, bias, privacy) that determines which dominates; avoid global verdicts.
The candidate claims a computing innovation is unbiased because it is automated, or ignores how training data and who was included in data collection shape the system's outputs.
Automation feels objective, and students do not connect data provenance to downstream behavior, so they miss bias and exclusion as design consequences.
What to do instead
For any innovation, ask who was sampled, what labels were used, and who is affected but absent; tie each answer to a data-collection or design decision rather than to the tool's neutrality.