Time: 120 minutes · 70 questions · No calculator (none needed) Format matches the real exam: Q1–57 single-select · Q58–62 reading passage + 5 single-select · Q63–70 multiple-select ("Select two answers")
Instructions: One sitting, timed. The Exam Reference Sheet (AP pseudocode) is provided on the real exam; this mock uses the same conventions — lists are 1-indexed, RANDOM(a, b) is inclusive, REPEAT UNTIL stops when its condition becomes true. Answer every question; there is no penalty for guessing. Target pace: ~100 seconds per question, with the passage set (Q58–62) budgeted at 9 minutes total.
Take this mock after Lesson 24. Score with the key at the end, then use the review pointers before attempting Mock Exam 2.
Documentation during development, explaining the why, helps collaborators; (A) is the anti-pattern | L2
101011?32+8+2+1 = 43; (B) drops the 1s bit | L3
What is displayed?
a ← 6
b ← 2
a ← a MOD b
b ← b + a
DISPLAY (a + b)
a ← 6 MOD 2 = 0; b ← 2+0 = 2; displays 2 | L7
The goal/why = purpose; function would describe behavior | L1
Divide-by-zero during execution = run-time; (A) syntax, (C) logic | L2
words ← ["ash", "elm", "oak", "fir"]. What is displayed?
DISPLAY (words[2])
DISPLAY (words[LENGTH(words) − 1])
words[2] = "elm"; LENGTH−1 = 3 → "oak" (1-indexed!) | L8
"Every original detail later" = lossless's exact use case | L4
For which value of x does this code display "yes"?
IF (x > 10 AND x MOD 5 = 0)
{
DISPLAY ("yes")
}
25 > 10 ✓ AND 25 MOD 5 = 0 ✓; (B) fails MOD; (A)/(D) fail the > | L9
Duration + date describe the video; frames/audio/dialogue are content | L5
Diverse perspectives catch blind spots — the CED's collaboration claim | L1
How many times is "go" displayed?
n ← 2
REPEAT UNTIL (n > 16)
{
DISPLAY ("go")
n ← n * 2
}
n = 2, 4, 8, 16 each fail > 16 (16 is not > 16) → 4 displays; stops at 32 | L11
Collection-method bias: only smartphone users could respond | L5
What does f(4) return?
PROCEDURE f(n)
{
IF (n MOD 2 = 0)
{
RETURN (n * 10)
}
RETURN (n + 1)
}
4 is even → RETURN (40); the second RETURN never runs | L14
2⁶ = 64 ≥ 60; 2⁵ = 32 is too few | L3
ROTATE_RIGHT() once, then ROTATE_RIGHT() again. It now faces:East → south → west; two rights = 180° | L10
Streaming on limited bandwidth tolerates loss; (A)/(D) need exactness | L4
What is displayed?
total ← 0
FOR EACH v IN [3, 0, 5, 2]
{
IF (v > 0)
{
total ← total + 1
}
}
DISPLAY (total)
Positives: 3, 5, 2 → count 3 (note it counts, not sums — the +1 body) | L12
Data abstraction: code survives data-size changes | L8
NOT (score ≥ 70)?NOT(≥ 70) ⟺ < 70; equality switches sides — (B) wrongly keeps 70 | L9
Shared open protocols = universal interoperability | L17
What is displayed?
L ← [8, 3, 6]
APPEND(L, 1)
REMOVE(L, 1)
DISPLAY (L[1] + L[3])
[8,3,6] → [8,3,6,1] → remove index 1 → [3,6,1]; L[1]+L[3] = 3+1 = 4 | L8
The thermostat's program is integral to its function; (A)/(B)/(D) are made/sold using computers | L1
1..52 inclusive = 52 outcomes; (A) has 53 including 0; (C) has 51 | L15
What does this code display for data ← [10, 20, 30, 40]?
result ← data[1]
FOR EACH d IN data
{
IF (d > result)
{
result ← d
}
}
DISPLAY (result)
Max-finder silhouette; honest init from data[1] → 40 | L12
example.org is to:Names → IP addresses; nothing more, nothing less | L17
Trace this code. What are the final values of x and y?
x ← 5
y ← 12
temp ← x
x ← y
y ← temp
Textbook three-step swap: temp saves 5; x = 12, y = 5 | L7
Measurement coverage drives counts — collection bias, not congestion truth | L5
1 → 5 → 9 → ... skips 7 (step 4 from 1 lands on 1, 5, 9...); x = 7 never true → infinite. (A)/(B) reach their stops; (C) starts true → zero runs | L11
INSERT(L, 3, "new") does what?INSERT places at the index and shifts right; (A) is replacement, (C) is APPEND | L8
year is divisible by 4. Which condition is correct?Divisible by 4 ⟺ remainder 0; (D) reverses the operands | L7
Guaranteed-complete-ordered vs. fast-unguaranteed — the transport trade-off | L17
What does g(3, 5) return?
PROCEDURE g(a, b)
{
result ← 0
REPEAT b TIMES
{
result ← result + a
}
RETURN (result)
}
Adds a (=3) b (=5) times → 15 | L11, L14
Untested boundary (empty list) → run-time crash; fixable, common, instructive | L2
Facing north: 2 forward (top-left), right → east, 2 forward (top-right); (B) turns west off-grid; (C) never goes north | L10
Purchases + zip codes live in different tables; member ID joins them. (A)/(B)/(D) each need only one table | L6
WWWWWWWWWWBBBBBWWWWW (10 W, 5 B, 5 W). Its run-length encoding is:Runs: 10 W, 5 B, 5 W — count each run once; (A) miscounts the tail | L4
Online-only service + access gap = divide converting into outcome gap | L21
Independent routing → possible reordering → sequence numbers | L17
Fewer samples = smaller file, coarser approximation — fidelity and size move together | L3
Large task + many volunteers + Internet = crowdsourcing (transcription is a classic) | L20
Surviving component failure = fault tolerance (via redundancy) | L18
What is displayed?
PROCEDURE twist(s)
{
RETURN (s + s)
}
word ← "ab"
word ← twist(word)
DISPLAY (twist(word))
word becomes "abab"; twist("abab") = "abababab" (8 characters) | L14, L8
Bias inherited from historical data — no intent required; (A) is the intent fallacy | L21
Non-commercial + credited = both terms satisfied; (B)/(D) are commercial; (C) violates both | L22
One more bit doubles capacity: 6 → 7 bits; (A) doubles the bits | L3
10 + max(20,20,20,20) = 30; four processors run the tasks simultaneously | L19
Urgency + link + credentials = phishing; navigate directly instead | L23
500 ≤ 512 = 2⁹ → ~9 examinations; halving chain, not half the list | L13
Open protocols + decentralization = permissionless growth | L17
genre = "mystery" (34 rows survive), then sorted by rating, descending. The resulting table has:Filter keeps 34; sort reorders those 34, top-rated first — row counts never change in a sort | L6
Know (password) + are (fingerprint); (B)/(C)/(D) repeat one category | L23
Aggregation: three innocuous posts = identity + patterns + absences | L23
Equivalent values, inconsistent formats → clean to one representation | L5
Exceeds one machine's storage → distribute data and work | L19
Open source's collaborative-improvement story; (C) confuses licensed code with public domain | L22
The bug lives at the 100 boundary — trace there, display intermediates there | L2
Unintended + harmful + scale-amplified + bias-raising; (D) is an absolutist non-answer | L20, L21
MealBridge is a nonprofit app connecting restaurants with surplus food to nearby food banks. Each evening, participating restaurants photograph and list their surplus (type, quantity, pickup deadline). The app's matching procedure ranks nearby food banks by refrigerated-storage capacity and driving distance, then notifies the top match, which can accept or pass; a pass notifies the next-ranked bank. Restaurants' listings, banks' acceptance histories, and pickup GPS routes are stored on MealBridge's servers. A public dashboard shows citywide totals — meals rescued, pounds diverted from landfills — without naming participants. MealBridge notes that participation requires a smartphone and that listings are English-only, and it reports matches are completed for 78% of listings, with unmatched food usually in neighborhoods with few nearby member banks.
Purpose = redirect surplus to banks, reduce waste; stated in sentence one | L24, L1
The passage names exactly two ranking inputs: storage capacity, driving distance. (B) is data the system stores but the passage doesn't say the ranking uses | L24
Totals-without-names is a privacy-by-aggregation choice — participants' individual patterns stay unexposed | L23, L24
Smartphone requirement + English-only listings = access barriers by device and language | L21
The gap's stated cause is bank coverage; the matching remedy targets that cause. (B)–(D) fix nothing about coverage | L21, L24
L ← [5, 10, 15]. Which operations result in a list of length 4? *(Select two.)APPEND and INSERT each add one element (3 → 4). (B) replaces in place; (D) shortens to 2 | L8
IP = addressing/routing; TCP = complete/ordered/retransmitting. (A) gives DNS a delivery job; (C) gives UDP the guarantee it defines itself by lacking | L17
Dual effects + unintended consequences — the CED's core IOC claims. (B) denies effects-beyond-purpose; (D) confuses outcomes with errors | L20
Timestamp/GPS describe the photo; changing metadata leaves content untouched. (A) inverts the definition | L5
(A): 4 → 8 → 12 deterministically. (D): 12, deterministically. (B) ranges 2–12; (C) ranges 10–12 — random values are never guaranteed | L15, L11
Iterative feedback + component testing with boundary inputs — both named CED practices. (A)/(B) are the named anti-patterns | L2
Which statements about this procedure are true? (Select two.)
PROCEDURE check(list, target)
{
FOR EACH item IN list
{
IF (item = target)
{
RETURN (true)
}
}
RETURN (false)
}
Early RETURN exits on first match; absent target → full scan → false. (C) describes a counter (no early exit); (D): empty list → loop runs zero times → returns false, no error | L14, L12
True MFA + unique long passwords. (A) is one breach from total compromise; (C) is phishing compliance | L23
Scoring: 1 point per question (multi-select questions require BOTH correct answers). Total: 70 points.
| Q | Ans | Why (and why not) | Review |
|---|---|---|---|
| 1 | C | Documentation during development, explaining the why, helps collaborators; (A) is the anti-pattern | L2 |
| 2 | A | 32+8+2+1 = 43; (B) drops the 1s bit | L3 |
| 3 | B | a ← 6 MOD 2 = 0; b ← 2+0 = 2; displays 2 | L7 |
| 4 | B | The goal/why = purpose; function would describe behavior | L1 |
| 5 | B | Divide-by-zero during execution = run-time; (A) syntax, (C) logic | L2 |
| 6 | A | words[2] = "elm"; LENGTH−1 = 3 → "oak" (1-indexed!) | L8 |
| 7 | B | "Every original detail later" = lossless's exact use case | L4 |
| 8 | C | 25 > 10 ✓ AND 25 MOD 5 = 0 ✓; (B) fails MOD; (A)/(D) fail the > | L9 |
| 9 | C | Duration + date describe the video; frames/audio/dialogue are content | L5 |
| 10 | B | Diverse perspectives catch blind spots — the CED's collaboration claim | L1 |
| 11 | B | n = 2, 4, 8, 16 each fail > 16 (16 is not > 16) → 4 displays; stops at 32 |
L11 |
| 12 | C | Collection-method bias: only smartphone users could respond | L5 |
| 13 | B | 4 is even → RETURN (40); the second RETURN never runs | L14 |
| 14 | B | 2⁶ = 64 ≥ 60; 2⁵ = 32 is too few | L3 |
| 15 | A | East → south → west; two rights = 180° | L10 |
| 16 | B | Streaming on limited bandwidth tolerates loss; (A)/(D) need exactness | L4 |
| 17 | C | Positives: 3, 5, 2 → count 3 (note it counts, not sums — the +1 body) | L12 |
| 18 | B | Data abstraction: code survives data-size changes | L8 |
| 19 | A | NOT(≥ 70) ⟺ < 70; equality switches sides — (B) wrongly keeps 70 | L9 |
| 20 | B | Shared open protocols = universal interoperability | L17 |
| 21 | B | [8,3,6] → [8,3,6,1] → remove index 1 → [3,6,1]; L[1]+L[3] = 3+1 = 4 | L8 |
| 22 | C | The thermostat's program is integral to its function; (A)/(B)/(D) are made/sold using computers | L1 |
| 23 | B | 1..52 inclusive = 52 outcomes; (A) has 53 including 0; (C) has 51 | L15 |
| 24 | D | Max-finder silhouette; honest init from data[1] → 40 | L12 |
| 25 | C | Names → IP addresses; nothing more, nothing less | L17 |
| 26 | A | Textbook three-step swap: temp saves 5; x = 12, y = 5 | L7 |
| 27 | B | Measurement coverage drives counts — collection bias, not congestion truth | L5 |
| 28 | D | 1 → 5 → 9 → ... skips 7 (step 4 from 1 lands on 1, 5, 9...); x = 7 never true → infinite. (A)/(B) reach their stops; (C) starts true → zero runs |
L11 |
| 29 | B | INSERT places at the index and shifts right; (A) is replacement, (C) is APPEND | L8 |
| 30 | A | Divisible by 4 ⟺ remainder 0; (D) reverses the operands | L7 |
| 31 | B | Guaranteed-complete-ordered vs. fast-unguaranteed — the transport trade-off | L17 |
| 32 | C | Adds a (=3) b (=5) times → 15 | L11, L14 |
| 33 | B | Untested boundary (empty list) → run-time crash; fixable, common, instructive | L2 |
| 34 | A | Facing north: 2 forward (top-left), right → east, 2 forward (top-right); (B) turns west off-grid; (C) never goes north | L10 |
| 35 | C | Purchases + zip codes live in different tables; member ID joins them. (A)/(B)/(D) each need only one table | L6 |
| Q | Ans | Why (and why not) | Review |
|---|---|---|---|
| 36 | D | Runs: 10 W, 5 B, 5 W — count each run once; (A) miscounts the tail | L4 |
| 37 | A | Online-only service + access gap = divide converting into outcome gap | L21 |
| 38 | C | Independent routing → possible reordering → sequence numbers | L17 |
| 39 | D | Fewer samples = smaller file, coarser approximation — fidelity and size move together | L3 |
| 40 | A | Large task + many volunteers + Internet = crowdsourcing (transcription is a classic) | L20 |
| 41 | C | Surviving component failure = fault tolerance (via redundancy) | L18 |
| 42 | D | word becomes "abab"; twist("abab") = "abababab" (8 characters) | L14, L8 |
| 43 | D | Bias inherited from historical data — no intent required; (A) is the intent fallacy | L21 |
| 44 | A | Non-commercial + credited = both terms satisfied; (B)/(D) are commercial; (C) violates both | L22 |
| 45 | D | One more bit doubles capacity: 6 → 7 bits; (A) doubles the bits | L3 |
| 46 | C | 10 + max(20,20,20,20) = 30; four processors run the tasks simultaneously | L19 |
| 47 | A | Urgency + link + credentials = phishing; navigate directly instead | L23 |
| 48 | D | 500 ≤ 512 = 2⁹ → ~9 examinations; halving chain, not half the list | L13 |
| 49 | C | Open protocols + decentralization = permissionless growth | L17 |
| 50 | D | Filter keeps 34; sort reorders those 34, top-rated first — row counts never change in a sort | L6 |
| 51 | A | Know (password) + are (fingerprint); (B)/(C)/(D) repeat one category | L23 |
| 52 | D | Aggregation: three innocuous posts = identity + patterns + absences | L23 |
| 53 | D | Equivalent values, inconsistent formats → clean to one representation | L5 |
| 54 | C | Exceeds one machine's storage → distribute data and work | L19 |
| 55 | A | Open source's collaborative-improvement story; (C) confuses licensed code with public domain | L22 |
| 56 | D | The bug lives at the 100 boundary — trace there, display intermediates there | L2 |
| 57 | C | Unintended + harmful + scale-amplified + bias-raising; (D) is an absolutist non-answer | L20, L21 |
| Q | Ans | Why (and why not) | Review |
|---|---|---|---|
| 58 | C | Purpose = redirect surplus to banks, reduce waste; stated in sentence one | L24, L1 |
| 59 | A | The passage names exactly two ranking inputs: storage capacity, driving distance. (B) is data the system stores but the passage doesn't say the ranking uses | L24 |
| 60 | D | Totals-without-names is a privacy-by-aggregation choice — participants' individual patterns stay unexposed | L23, L24 |
| 61 | D | Smartphone requirement + English-only listings = access barriers by device and language | L21 |
| 62 | A | The gap's stated cause is bank coverage; the matching remedy targets that cause. (B)–(D) fix nothing about coverage | L21, L24 |
| Q | Ans | Why (and why not) | Review |
|---|---|---|---|
| 63 | A, C | APPEND and INSERT each add one element (3 → 4). (B) replaces in place; (D) shortens to 2 | L8 |
| 64 | B, D | IP = addressing/routing; TCP = complete/ordered/retransmitting. (A) gives DNS a delivery job; (C) gives UDP the guarantee it defines itself by lacking | L17 |
| 65 | A, C | Dual effects + unintended consequences — the CED's core IOC claims. (B) denies effects-beyond-purpose; (D) confuses outcomes with errors | L20 |
| 66 | B, C | Timestamp/GPS describe the photo; changing metadata leaves content untouched. (A) inverts the definition | L5 |
| 67 | A, D | (A): 4 → 8 → 12 deterministically. (D): 12, deterministically. (B) ranges 2–12; (C) ranges 10–12 — random values are never guaranteed | L15, L11 |
| 68 | C, D | Iterative feedback + component testing with boundary inputs — both named CED practices. (A)/(B) are the named anti-patterns | L2 |
| 69 | A, B | Early RETURN exits on first match; absent target → full scan → false. (C) describes a counter (no early exit); (D): empty list → loop runs zero times → returns false, no error | L14, L12 |
| 70 | B, D | True MFA + unique long passwords. (A) is one breach from total compromise; (C) is phishing compliance | L23 |
1. Raw score: ______ / 70 (multi-select counts only when both answers are correct)
2. Section I percentage: raw ÷ 70 × 100 = ______ %
3. Estimated composite (Section I is 70% of the exam; assume your Create PT + written responses land in the middle band until scored):
| Section I raw | With a solid PT (≈4–5 of 6 pts) | With a weaker PT (≈2–3 of 6 pts) |
|---|---|---|
| 55–70 | 5 likely | 4–5 |
| 45–54 | 4 likely | 3–4 |
| 35–44 | 3 likely | 3 |
| 27–34 | 2–3 | 2 |
| below 27 | 2 | 1–2 |
These bands are ESTIMATES built from published score distributions and typical cut ranges — actual AP cut scores vary by year and form. Use them for study prioritization, not prediction.
4. Diagnosis by Big Idea — tally your misses:
| Big Idea | Questions | Missed | If 3+ missed, reread |
|---|---|---|---|
| CRD (Creative Development) | 1, 4, 5, 10, 22, 33, 56, 68 | ___ / 8 | L1–L2 |
| DAT (Data) | 2, 7, 9, 12, 14, 16, 27, 35, 36, 39, 45, 50, 53, 66 | ___ / 14 | L3–L6 |
| AAP (Algorithms & Programming) | 3, 6, 8, 11, 13, 15, 17, 18, 19, 21, 23, 24, 26, 28, 29, 30, 32, 34, 42, 48, 63, 67, 69 | ___ / 23 | L7–L16 |
| CSN (Systems & Networks) | 20, 25, 31, 38, 41, 46, 49, 54, 64 | ___ / 9 | L17–L19 |
| IOC (Impact of Computing) | 37, 40, 43, 44, 47, 51, 52, 55, 57, 58–62, 65, 70 | ___ / 16 | L20–L24 |
On the real exam you'll answer two written-response questions about YOUR Create PT, using your Personalized Project Reference. Practice the format on this sample PPR first, then re-answer every prompt about your own program.
PPR Screenshot i–ii (list creation and use):
pantry ← [] ← list created empty
daysLeft ← []
...
APPEND(pantry, itemName) ← list grows as the user adds items
APPEND(daysLeft, days)
PPR Screenshot iii–iv (procedure and call):
PROCEDURE countExpiring(dayList, limit)
{
count ← 0
FOR EACH d IN dayList
{
IF (d ≤ limit)
{
count ← count + 1
}
}
RETURN (count)
}
soon ← countExpiring(daysLeft, 3) ← the call
DISPLAY (soon)
WR 1 (Program Design, Function, and Purpose): Describe the purpose of PantryPal, then describe how a user interacts with it from input to output. Model: The purpose is to reduce household food waste by warning users which pantry items expire soon. The user enters each item's name and days until expiration; the program stores them in parallel lists and, on request, displays how many items expire within 3 days.
WR 2(a) (Algorithm Development): Explain how the algorithm in countExpiring determines its result, including the role of selection and iteration.
Model: The FOR EACH loop (iteration) examines every value in dayList exactly once. The IF statement (selection) compares each value to limit; only values at or below it increment count. After the loop, count holds the number of qualifying items, which the procedure returns. Without the selection, every item would be counted; without the iteration, only one hard-coded item could be checked.
WR 2(b) (Errors and Testing): Describe a test case for countExpiring including input and expected output, and an error the test could reveal.
Model: Input: dayList = [1, 3, 7], limit = 3; expected output: 2 (the 1 and the 3 — the boundary value must count because the comparison is ≤). If the procedure returned 1, the comparison was likely written < instead of ≤ — a boundary logic error this test is specifically designed to expose. A second test with an empty list (expected 0) confirms no run-time error occurs.
WR 2(c) (Data and Procedural Abstraction): Explain how the list daysLeft manages complexity in the program.
Model: daysLeft stores every item's remaining days under one name, so the program processes all of them with a single loop over the list. Without it, the program would need a separate variable per item and could not handle a change in the number of items without rewriting the code; with it, the same code works for 3 items or 300.
Now: answer all four prompts for YOUR program, in writing, without looking at these models. If any answer requires information not visible in your own PPR screenshots, improve the screenshots — that gap is exactly what costs points on exam day.
Mock Exam 2 is a fresh full simulation at slightly higher code-analysis difficulty. Take it after reviewing your misses here — ideally one week later, timed, in one sitting.
Your running multiple-choice score appears in the bar below. Self-score the free-response section with the rubrics in the answer key, then use the diagnostic table to target review.