AP CSP Practice Exam 2

AP Computer Science Principles

Full Practice Exam — #2 — 2 Hours — 70 Questions

Section I: 60 Single-Answer Questions 131-137: Select TWO No Penalty for Guessing 2 Hours Total

Choose Your Mode

Test Mode: Timed exam with submit button at the end

Time Remaining
2:00:00
0 of 67 questions answered
Score: —

Exam Instructions

  • This exam contains 70 questions: 60 single-answer (Questions 1–60) and 7 select-two (Questions 131–137).
  • Before selecting an answer, predict what you think the answer is — then eliminate obviously wrong choices.
  • Pay attention to highlighted key words: NOT, EXCEPT, ALWAYS, NEVER, BEST.
  • For select-two questions, choose exactly two correct answers — both must be correct for credit.
  • Points are not deducted for incorrect or unanswered questions.
  • Click Submit Exam when finished to see your score and explanations.

📝 Looking for Written Response Questions?

This exam focuses on the 70 multiple-choice questions (MCQ). For the 2 written response questions that complete Practice Exam 2, visit:

AP CSP Practice Exam 2 — Written Response Section →

Need 1-on-1 Help? Work with an Expert AP CSP Tutor

Tanner Crow has 11+ years of teaching experience with 1,845+ verified tutoring hours. His AP CSP students score 5s at 3.6× the national average (34.8% vs 9.6%).

$150/hour (single session) | $125/hour (5-session package)

Schedule Your Session
Section I — Single-Answer Questions Questions 1–60 | Choose ONE best answer
Question 1 — Big Idea 2: Data
A student stores the number 255 in a binary representation using 8 bits. Which of the following accurately describes what happens when 1 is added to this value using the SAME 8-bit storage?
Correct Answer: B
Why B is correct: 11111111 in binary is 255. Adding 1 produces 100000000, which requires 9 bits. With only 8 bits available, the leading 1 is lost (overflow), and the result stored is 00000000 — a classic integer overflow/wraparound.

Why A is wrong: 100000000 cannot fit in 8 bits.
Why C is wrong: Most systems do not automatically reject overflow — they silently wrap.
Why D is wrong: The problem specifies binary (integer) storage, not floating-point.
Question 2 — Big Idea 3: Algorithms and Programming
The following code segment is intended to find the largest value in the list nums. Assume nums is a non-empty list of integers.
largest ← nums[1] FOR EACH item IN nums { IF (item > largest) { largest ← item } } DISPLAY(largest)
Which of the following correctly identifies a flaw in this code?
Correct Answer: C
Why C is correct: This algorithm is functionally correct. Initializing largest to nums[1] (the first element) is a valid approach. The FOR EACH loop then checks every element. If nums contains only negative integers, the first element becomes largest and larger (less-negative) elements will update it correctly via item > largest.

Why A is wrong: A describes a minor inefficiency, not a flaw, and correctly notes the output is still correct — but the question asks about a flaw, and this is not one.
Why B is wrong: > vs. makes no difference for finding a maximum — both preserve the correct largest value.
Why D is wrong: With all-negative list like [-5, -3, -8], largest starts as -5. -3 > -5 is true, so largest updates to -3. The algorithm works correctly.
Question 3 — Big Idea 1: Creative Development
A software team is developing a messaging app. During initial design meetings, they interview potential users and observe how people currently send messages. This process is best described as which computing practice?
Correct Answer: B
Why B is correct: AP CSP's Creative Development framework emphasizes investigating and reflecting on the needs of the end users before building. Interviewing users and observing current behavior is the “investigate” phase of the design process.

Why A is wrong: Alpha testing happens after building a product, not before design begins.
Why C is wrong: Iterative development describes the build-test-revise cycle, not the initial investigation phase.
Why D is wrong: Decomposition is about breaking a problem into parts for implementation, not gathering user requirements.
Question 4 — Big Idea 2: Data
A researcher collects data about students' test scores and the number of hours they spent studying. She finds a strong positive correlation between study hours and test scores. Which of the following conclusions is MOST justified by this data?
Correct Answer: B
Why B is correct: Correlation does not imply causation. A strong positive correlation means the two variables tend to move together, but other confounding variables (ability, prior knowledge, course difficulty) could explain the relationship. The data alone cannot establish causation.

Why A is wrong: Claiming causation from correlation alone is a fundamental statistical error.
Why C is wrong: Even if the correlation is bidirectional, concluding “motivation” is the cause introduces an unmeasured variable not in the data.
Why D is wrong: A correlation, no matter how strong, cannot predict an individual's exact score — there is always variation around the trend line.
Question 5 — Big Idea 3: Algorithms and Programming
Consider the following procedure definition:
PROCEDURE mystery(n) { result ← 0 REPEAT n TIMES { result ← result + n } RETURN result }
What value does mystery(4) return?
Correct Answer: C
Why C is correct: When mystery(4) is called, n = 4. The loop repeats 4 times, and each iteration adds n (which is 4) to result. So: 0 + 4 + 4 + 4 + 4 = 16. This is equivalent to n × n = 4 × 4 = 16.

Why A is wrong: 4 would be the result if n were added only once.
Why B is wrong: 8 would be 4 + 4, i.e., only 2 iterations.
Why D is wrong: 10 = 1+2+3+4, which would be the triangular number — but this loop adds n each time, not the iteration counter.
Question 6 — Big Idea 4: Computing Systems and Networks
The Internet was specifically designed so that data can be rerouted around damaged or unavailable network nodes. Which Internet characteristic makes this possible?
Correct Answer: B
Why B is correct: The Internet uses packet switching, where each packet can take any available route to reach the destination. If a node is down, packets are automatically rerouted. This redundancy and flexibility is what makes the Internet fault-tolerant.

Why A is wrong: Fixed bandwidth allocation describes a different, older model — not the Internet's design.
Why C is wrong: Circuit switching (used in traditional phone systems) establishes a dedicated path before transmission and cannot reroute dynamically.
Why D is wrong: Encryption provides confidentiality, not fault tolerance or rerouting capability.
Question 7 — Big Idea 5: Impact of Computing
A music streaming company collects data on every song a user listens to, including time of day, location, and device type. They use this data to recommend songs to users. A user is MOST concerned about which of the following?
Correct Answer: B
Why B is correct: From the user's privacy perspective, the most significant concern is that detailed behavioral and location data could be shared with advertisers, data brokers, or governments without consent. This is a core AP CSP IOC concern: data collected for one purpose being used for another (secondary use).

Why A is wrong: Recommendation accuracy is a usability concern, not a privacy concern.
Why C is wrong: Storage capacity is an infrastructure concern for the company, not a user privacy concern.
Why D is wrong: Server downtime is a reliability concern, not a privacy concern.
Question 8 — Big Idea 3: Algorithms and Programming
The following code segment is INTENDED to display only the even numbers from 1 to 10. Identify the error.
num ← 1 REPEAT UNTIL (num > 10) { IF (num MOD 2 = 1) { DISPLAY(num) } num ← num + 1 }
Correct Answer: B
Why B is correct: num MOD 2 = 1 is true when num is odd (remainder 1 when divided by 2). Since the intent is to display even numbers, the condition should be num MOD 2 = 0 (remainder 0 when divided by 2).

Why A is wrong: When num reaches 11, the condition num > 10 is true and the loop exits. This correctly includes 10 in the iteration. The loop termination condition is not the problem.
Why C is wrong: Starting at 2 would skip 1, but 1 is odd and would already be excluded by a corrected condition. Initializing at 1 is not the root error.
Why D is wrong: Incrementing by 2 would also work only if starting at an even number, but the single root error — the wrong MOD condition — must be fixed first.
Question 9 — Big Idea 2: Data
A city government digitizes paper records of property ownership going back 100 years. During digitization, some handwritten fields are misread by the optical character recognition (OCR) software. Which of the following best describes the resulting data quality problem?
Correct Answer: B
Why B is correct: When OCR software misreads handwritten text, the resulting digital records contain wrong values — this is inaccurate data. It is present but incorrect, which is a distinct data quality issue from missing or incomplete data.

Why A is wrong: The scenario describes misread values, not missing entire entries.
Why C is wrong: Nothing in the scenario indicates duplication of records.
Why D is wrong: The records are digitized and presumably accessible; the problem is their accuracy, not their accessibility.
Question 10 — Big Idea 3: Algorithms and Programming
A programmer writes the following procedure to return whether a number is prime. The procedure contains a logic error. Identify which line causes the incorrect behavior.
PROCEDURE isPrime(n) { IF (n < 2) // Line 1 { RETURN false } divisor ← 2 // Line 2 REPEAT UNTIL (divisor > n) // Line 3 { IF (n MOD divisor = 0) { RETURN false } divisor ← divisor + 1 } RETURN true // Line 4 }
Correct Answer: C
Why C is correct: The loop continues until divisor > n. When divisor equals n, the check n MOD n = 0 is always true (any integer divides itself evenly), causing the procedure to return false for every prime number. The condition should be divisor > n / 2 or divisor * divisor > n to stop before testing n against itself.

Why A is wrong: 0 and 1 are correctly not prime; the condition n < 2 returning false is correct.
Why B is wrong: Starting at 1 would make every number return false, since n MOD 1 = 0 for all n. Starting at 2 is correct.
Why D is wrong: After the loop exits without finding a divisor, returning true is correct — the number is prime.
Question 11 — Big Idea 4: Computing Systems and Networks
Which of the following BEST describes the role of the Domain Name System (DNS) in Internet communication?
Correct Answer: B
Why B is correct: DNS is essentially the Internet's phone book. When you type example.com, DNS looks up the corresponding IP address (e.g., 93.184.216.34) so your browser knows where to send requests.

Why A is wrong: Encryption is handled by protocols like TLS/SSL, not DNS.
Why C is wrong: Packet routing is handled by routers using the IP protocol, not DNS.
Why D is wrong: Content delivery networks (CDNs) cache web pages for fast delivery; DNS is not a content cache.
Question 12 — Big Idea 5: Impact of Computing
A social media platform uses an algorithm to automatically filter and remove posts it classifies as “harmful.” The algorithm incorrectly removes a post from a public health organization warning about a disease outbreak. This is an example of which type of algorithmic error?
Correct Answer: A
Why A is correct: A false positive occurs when a system incorrectly classifies something as positive (harmful) when it is actually negative (safe). The algorithm flagged and removed a safe, beneficial health post — that is a false positive.

Why B is wrong: A false negative means something truly harmful was NOT flagged — the opposite of what happened here.
Why C is wrong: A true positive means something harmful was correctly identified as harmful. The public health post is not harmful.
Why D is wrong: A syntax error is a programming/code mistake, not a classification error. The algorithm ran but classified incorrectly.
Question 13 — Big Idea 3: Algorithms and Programming
A list scores contains [85, 92, 78, 90, 88]. Consider the following code segment:
total ← 0 FOR EACH s IN scores { total ← total + s } avg ← total / LENGTH(scores) DISPLAY(avg)
What is displayed?
Correct Answer: B
Why B is correct: total = 85+92+78+90+88 = 433. LENGTH(scores) = 5. avg = 433 / 5 = 86.6.

Why A is wrong: 85 is the first element, not the average.
Why C is wrong: 433 is the total sum before dividing.
Why D is wrong: 88 is the last element in the list, not the average.
Question 14 — Big Idea 2: Data
Which of the following demonstrates the concept of lossy data compression, as opposed to lossless compression?
Correct Answer: B
Why B is correct: JPEG compression permanently discards image data (fine color differences) that are unlikely to be noticed by the human eye. The original data cannot be perfectly reconstructed — this is the defining characteristic of lossy compression.

Why A is wrong: Replacing repeated sequences with short codes and allowing full reconstruction is lossless compression (e.g., LZ77, Huffman coding).
Why C is wrong: ZIP archives use lossless compression — files are stored at original quality and fully restored when extracted.
Why D is wrong: Perfect restoration means lossless, not lossy.
Question 15 — Big Idea 3: Algorithms and Programming
A linear search and a binary search are both used to find a target value in a list. Which of the following is a NECESSARY precondition for binary search to work correctly that is NOT required for linear search?
Correct Answer: B
Why B is correct: Binary search works by repeatedly comparing the target to the middle element of the remaining search range, then eliminating half the list. This only works if the list is sorted — otherwise, eliminating half the elements could discard the target. Linear search checks each element sequentially and works on unsorted lists.

Why A is wrong: There is no minimum size requirement. Binary search is more efficient on large lists, but it is not a correctness precondition.
Why C is wrong: Binary search works on any ordered data type (strings, floats, integers) as long as there is a consistent ordering relation.
Why D is wrong: Binary search works on one-dimensional lists; no two-dimensional structure is needed.
Question 16 — Big Idea 5: Impact of Computing
The Creative Commons licensing system allows creators to specify how their works may be used by others. Which of the following BEST describes why Creative Commons licenses are beneficial to the computing community?
Correct Answer: B
Why B is correct: Creative Commons licenses occupy a middle ground between full copyright (“all rights reserved”) and public domain (“no rights reserved”). Creators can choose specific permissions (e.g., attribution required, non-commercial only, no derivatives), enabling legal sharing and collaboration while retaining specified rights.

Why A is wrong: Creative Commons licenses do not eliminate copyright — they operate within copyright law and allow creators to retain specified rights.
Why C is wrong: CC licenses do not automatically generate revenue. Some allow commercial use, others do not, but none include payment mechanisms.
Why D is wrong: CC licenses are chosen by individual creators, not governments.
Question 17 — Big Idea 3: Algorithms and Programming
Consider the following code segment. What is the value of x after execution?
x ← 10 y ← 3 IF (x MOD y = 1) { x ← x + y } ELSE IF (x MOD y = 0) { x ← x * y } ELSE { x ← x - y }
Correct Answer: B
Why B is correct: 10 MOD 3 = 1 (10 = 3×3 + 1). So the first condition x MOD y = 1 is true. Therefore: x ← 10 + 3 = 13.

Why A is wrong: 7 would result from x ← x - y = 10 - 3, which executes only in the ELSE branch (when MOD gives neither 1 nor 0).
Why C is wrong: 30 = 10 × 3 executes when MOD y = 0, but 10 MOD 3 0.
Why D is wrong: x = 10 would mean no branch executed, but the first condition is true.
Question 18 — Big Idea 4: Computing Systems and Networks
A cybersecurity researcher discovers that an attacker is monitoring network traffic between a user and a website, reading the contents of all data transmitted. The user believes they are communicating only with the website. This attack is known as a:
Correct Answer: C
Why C is correct: A man-in-the-middle (MITM) attack places an attacker between the user and the server, silently intercepting (and possibly modifying) communications. The user is unaware because the attacker relays data normally. HTTPS/TLS encryption is designed specifically to prevent MITM attacks.

Why A is wrong: DDoS attacks overwhelm servers with traffic; they do not involve reading private communications.
Why B is wrong: Phishing uses deceptive emails/websites to steal credentials — it doesn't involve monitoring live network traffic.
Why D is wrong: SQL injection targets database queries through web forms, not network traffic interception.
Question 19 — Big Idea 3: Algorithms and Programming
A procedure RANDOM(a, b) returns a random integer between a and b, inclusive. A programmer wants to simulate flipping a fair coin, where HEAD = 1 and TAIL = 0. Which code segment correctly simulates this?
Correct Answer: A
Why A is correct: RANDOM(0, 1) returns either 0 or 1 with equal probability (50% each), perfectly simulating a fair coin where HEAD=1, TAIL=0.

Why B is wrong: RANDOM(1, 2) returns 1 or 2 — not 0 or 1 as required by the mapping.
Why C is wrong: RANDOM(0, 2) returns 0, 1, or 2 with equal probability (33.3% each). This gives three outcomes, not two — not a fair coin.
Why D is wrong: RANDOM(1, 10) MOD 2 produces 0 for even results (2,4,6,8,10 — five values) and 1 for odd results (1,3,5,7,9 — five values). This is 50/50, so it technically works, but option A is the simpler and most direct correct answer.
Question 20 — Big Idea 2: Data
A researcher has a dataset with 1,000 rows of patient health records. She notices that 950 rows have the field “exercise_hours_per_week” filled in, but 50 rows have it blank. When she calculates the average exercise hours across all patients, she divides by 1,000. What problem does this introduce?
Correct Answer: B
Why B is correct: If blank values are treated as 0 in the sum, dividing by 1,000 (total records) rather than 950 (records with data) artificially lowers the average. The 50 missing rows contribute 0 to the numerator but add to the denominator, pulling the average downward. This is a common data quality error when handling missing values (null/blank handling).

Why A is wrong: Dividing by total records is only correct if all records have valid values. Missing data requires careful handling.
Why C is wrong: 1,000 rows is a reasonable dataset size; statistical validity is not the issue here.
Why D is wrong: Missing values are not counted twice — they are counted once (as 0) in the denominator but not added to the sum.
Question 21 — Big Idea 3: Algorithms and Programming
A procedure countAbove(lst, threshold) is intended to return the number of values in lst that are strictly greater than threshold. The following code contains a bug.
PROCEDURE countAbove(lst, threshold) { count ← 0 FOR EACH val IN lst { IF (val >= threshold) // intended: strictly greater than { count ← count + 1 } } RETURN count }
If called as countAbove([3, 5, 5, 7], 5), what does the buggy code return, and what should it return?
Correct Answer: A
Why A is correct: With [3, 5, 5, 7] and threshold 5:
Buggy code uses 5: matches 5, 5, 7 → returns 3.
Correct code should use > 5: matches only 7 → returns 1.

Why B is wrong: If the bug gave 3 and the correct answer were 2, that would mean two values exceed 5 — but only 7 is strictly greater than 5.
Why C is wrong: The buggy code matches 5, 5, and 7 (three values 5), not two.
Why D is wrong: Three values cannot be strictly greater than 5 in this list; only 7 qualifies.
Question 22 — Big Idea 4: Computing Systems and Networks
Which of the following BEST explains why scalability is an important design consideration for cloud computing services?
Correct Answer: B
Why B is correct: Scalability means a system can grow (scale up) or shrink (scale down) its resources in response to demand. A cloud service experiencing a traffic spike can spin up additional servers; during low traffic, it can reduce resources to save cost. This flexibility is a core advantage of cloud computing.

Why A is wrong: Encryption is a security concern, not a scalability concern.
Why C is wrong: Data durability (protection against data loss) is a reliability/redundancy concern, separate from scalability.
Why D is wrong: User authentication is a security concern unrelated to scalability.
Question 23 — Big Idea 3: Algorithms and Programming
Which of the following code segments correctly swaps the values of variables a and b?
Correct Answer: B
Why B is correct: A temporary variable is required to swap without losing data. Step-by-step: temp ← a (saves original a), a ← b (overwrites a with b's value), b ← temp (gives b the original value of a). This correctly swaps.

Why A is wrong: After a ← b, a's original value is lost. Then b ← a simply copies b's value back to b — both variables end up holding b's original value.
Why C is wrong: temp ← b saves b. Then a ← b (a gets b, original a is lost). Then b ← temp (b gets b again). Result: a = original b, b = original b. The original value of a is lost.
Why D is wrong: temp is used without being defined, so b's new value is undefined.
Question 24 — Big Idea 5: Impact of Computing
Which of the following BEST describes a digital divide in access to technology?
Correct Answer: B
Why B is correct: The digital divide refers to inequality in access to technology based on factors like income, geography, education, age, or disability. Rural areas may lack broadband; low-income families may not afford devices; elderly populations may lack digital literacy.

Why A is wrong: Programming language barriers are a technical concern, not a digital divide.
Why C is wrong: Cross-platform compatibility is a technical issue, not a digital divide.
Why D is wrong: This is factually incorrect; rural areas typically have slower, less reliable Internet access.
Question 25 — Big Idea 3: Algorithms and Programming
Consider the following procedure:
PROCEDURE transform(lst) { result ← [] FOR EACH item IN lst { IF (item MOD 2 = 0) { APPEND(result, item * 2) } } RETURN result }
What does transform([1, 4, 7, 8, 10]) return?
Correct Answer: B
Why B is correct: The procedure filters for even numbers (MOD 2 = 0), then doubles them. Even numbers: 4, 8, 10. Doubled: 4×2=8, 8×2=16, 10×2=20. Result: [8, 16, 20].

Why A is wrong: This would require doubling all numbers, not just even ones.
Why C is wrong: This is the even numbers without doubling.
Why D is wrong: These are odd numbers, which are filtered out.
Question 26 — Big Idea 2: Data
A dataset contains customer purchase records. A data analyst wants to find patterns by grouping customers who made similar purchases. This process is an example of:
Correct Answer: B
Why B is correct: Grouping similar data points into clusters or categories is classification/clustering, a fundamental data analysis technique used in machine learning and pattern recognition.

Why A is wrong: Encryption secures data, doesn't find patterns.
Why C is wrong: Compression reduces file size.
Why D is wrong: Deletion removes data permanently.
Question 27 — Big Idea 3: Algorithms and Programming
Consider the following procedure that is intended to return the index of the first occurrence of target in list, or -1 if target is not found. The procedure contains a logic error.
PROCEDURE findFirst(list, target) { index ← 1 FOR EACH item IN list { IF (item = target) { RETURN index } } index ← index + 1 RETURN -1 }
Which of the following BEST describes the error?
Question 28 — Big Idea 2: Data
A company stores customer ages in a database field that accepts only integers between 0 and 127. A customer enters their age as 150. Which of the following BEST describes what happens?
Question 29 — Big Idea 3: Algorithms and Programming
A programmer writes the following code to determine if a number is even or odd:
PROCEDURE checkEvenOdd(n) { IF (n / 2 = 0) { RETURN "even" } ELSE { RETURN "odd" } }
Which of the following statements are true about this code?
I. The code works correctly for all positive integers.
II. The condition should use n MOD 2 = 0 instead of n / 2 = 0.
III. The code will always return "odd" for any positive integer input.
Question 30 — Big Idea 5: Impact of Computing
A social media company uses machine learning to detect and remove hate speech from its platform. The algorithm incorrectly flags and removes a post from a civil rights organization discussing historical discrimination. This scenario illustrates which potential problem with automated content moderation?
Question 31 — Big Idea 4: Computing Systems and Networks
Which protocol is responsible for ensuring data packets are delivered reliably and in the correct order over the Internet?
Question 32 — Big Idea 3: Algorithms and Programming
Consider the following code segment:
x ← 7 y ← 2 z ← x MOD y x ← x / y y ← z DISPLAY(x) DISPLAY(y) DISPLAY(z)
What is displayed? (Assume integer division.)
Question 33 — Big Idea 1: Creative Development
During software development, a team discovers that a key feature does NOT work as intended after deployment. Which development practice would have been MOST effective in identifying this problem earlier?
Question 34 — Big Idea 2: Data
A 24-bit color image uses 8 bits each for red, green, and blue. How many distinct colors can be represented?
Question 35 — Big Idea 3: Algorithms and Programming
The following procedure is intended to return true if a list contains any duplicate values, and false otherwise:
PROCEDURE hasDuplicates(list) { FOR EACH item IN list { FOR EACH other IN list { IF (item = other) { RETURN true } } } RETURN false }
Which of the following correctly identifies the error in this code?
Question 36 — Big Idea 5: Impact of Computing
A fitness tracking app collects detailed location data to map users' running routes. The company says the data is anonymized, but researchers show it can be re-identified by combining it with public data. This is an example of:
Question 37 — Big Idea 4: Computing Systems and Networks
A firewall blocks all incoming traffic on port 22 (SSH) but allows outgoing traffic on that port. Which explanation is BEST?
Question 38 — Big Idea 3: Algorithms and Programming
Consider the following code:
nums ← [5, 12, 9, 3, 18, 7] count ← 0 FOR EACH n IN nums { IF (n > 10) { count ← count + 1 } } DISPLAY(count)
What is displayed?
Question 39 — Big Idea 2: Data

A city government wants to analyze traffic patterns using data from traffic cameras. The raw data includes timestamps, vehicle types, and license plate numbers. Before releasing the data to researchers, the city removes all license plate numbers. Which statement is MOST accurate?

Question 40 — Big Idea 3: Algorithms and Programming
A programmer writes the following procedure to reverse a list:
PROCEDURE reverseList(lst) {
  reversed ← []
  FOR EACH item IN lst {
    INSERT(reversed, 1, item)
  }
  RETURN reversed
}

Assume INSERT(list, index, value) inserts value at position index in list, shifting existing elements to the right. Does this procedure correctly reverse the list?

Question 41 — Big Idea 5: Impact of Computing

A job recruitment platform uses an algorithm to rank applicants based on rsum keywords and work history. An investigation reveals that the algorithm systematically ranks female applicants lower than male applicants with similar qualifications. This is MOST likely caused by:

Question 42 — Big Idea 4: Computing Systems and Networks
Which of the following is a characteristic of symmetric encryption?
Question 43 — Big Idea 3: Algorithms and Programming
Consider the following procedure:
PROCEDURE mystery(n) {
  IF (n  1) {
    RETURN 1
  } ELSE {
    RETURN n * mystery(n - 1)
  }
}

What does mystery(5) return?

Question 44 — Big Idea 1: Creative Development

A development team is building a mobile app. They create a basic prototype, show it to potential users, collect feedback, and then revise the design before writing more code. This process is BEST described as:

Question 45 — Big Idea 2: Data
A researcher has a dataset of 10,000 customer reviews. She wants to determine the overall sentiment (positive, neutral, or negative) of each review. Which of the following approaches would be MOST efficient for processing this volume of data?
Question 46 — Big Idea 3: Algorithms and Programming
The following code is intended to find the minimum value in a list of positive integers. Identify the error:
PROCEDURE findMin(nums) {
  min ← 0
  FOR EACH n IN nums {
    IF (n < min) {
      min ← n
    }
  }
  RETURN min
}
Which of the following BEST describes the error?
Question 47 — Big Idea 5: Impact of Computing

A country implements a national ID system that stores citizens' biometric data (fingerprints, facial recognition) in a centralized government database. Which of the following is a valid privacy concern with this system?

Question 48 — Big Idea 4: Computing Systems and Networks

A large online retailer experiences a sudden surge in traffic when a popular product goes on sale. The company's cloud infrastructure automatically allocates additional servers to handle the increased load, then reduces server capacity when traffic returns to normal. This is an example of:

Question 49 — Big Idea 3: Algorithms and Programming
Consider the following code segment:
words ← ["apple", "banana", "cherry", "date"]
result ← []
FOR EACH w IN words {
  IF (LENGTH(w) > 5) {
    APPEND(result, w)
  }
}
DISPLAY(result)

What is displayed?

Question 50 — Big Idea 2: Data

A database contains a table with 1 million rows. A data analyst wants to get a representative sample for analysis. Which sampling method is MOST likely to produce an unbiased sample?

Question 51 — Big Idea 3: Algorithms and Programming
The following code segment is intended to count how many times the value target appears in the list items. Which line contains an error?
1 count ← 0
2 FOR EACH item IN items
3 {
4   IF (item = target)
5   {
6     count ← count + item
7   }
8 }
9 RETURN count
Question 52 — Big Idea 5: Impact of Computing

Open-source software licenses allow anyone to view, modify, and distribute the source code. Which of the following is a benefit of open-source software?

Question 53 — Big Idea 4: Computing Systems and Networks
Which of the following BEST describes the function of an IP address?
Question 54 — Big Idea 1: Creative Development

A software team uses version control (e.g., Git) during development. Which of the following is a primary benefit of version control systems?

Question 55 — Big Idea 2: Data

A photo sharing app allows users to apply filters that adjust brightness, contrast, and color saturation. The app processes images using which type of data representation?

Question 56 — Big Idea 3: Algorithms and Programming
Which of the following statements are true about linear search and binary search?

I. Linear search works on both sorted and unsorted lists.
II. Binary search requires the list to be sorted.
III. Binary search is always faster than linear search for all input sizes.
Question 57 — Big Idea 5: Impact of Computing

A city government deploys "smart" streetlights that use sensors and cameras to adjust brightness based on pedestrian and vehicle traffic. Footage from these cameras is stored and can be accessed by law enforcement. Which of the following is a valid concern about this technology?

Question 58 — Big Idea 4: Computing Systems and Networks
A company's network uses both IPv4 and IPv6 addressing. Which of the following BEST explains why IPv6 was developed?
Question 59 — Big Idea 3: Algorithms and Programming
Consider the following procedure:
PROCEDURE combine(list1, list2) {
  result ← []
  FOR EACH item IN list1 {
    APPEND(result, item)
  }
  FOR EACH item IN list2 {
    APPEND(result, item)
  }
  RETURN result
}

What does combine([1, 2], [3, 4]) return?

Question 60 — Big Idea 2: Data

A weather forecasting model uses historical data to predict future temperatures. The model consistently underestimates temperatures in urban areas compared to rural areas. This is MOST likely caused by:

Section II — Select-Two Questions Questions 131–137 | Choose EXACTLY TWO correct answers

Select-Two Instructions

  • Each question below has exactly two correct answers.
  • You must select both correct answers to receive credit — partial credit is not awarded.
  • Use the checkboxes to mark your two selections before submitting.
Question 131 — Big Idea 5: Impact of Computing | Select TWO
Which of the following are BENEFICIAL effects of the widespread availability of the Internet? Select TWO.
Correct Answers: A and C

Why A is correct: Online education platforms have genuinely expanded access to quality education for people in remote areas, reducing geographic barriers that previously limited learning opportunities.

Why C is correct: Social media and online platforms have enabled new forms of civic participation, grassroots organizing, and direct communication with elected officials across geographic boundaries.

Why B is wrong: The Internet does not guarantee accuracy. It has dramatically increased the spread of misinformation and disinformation — there is no universal fact-checking mechanism.

Why D is wrong: The Internet has introduced entirely new categories of crime (phishing, ransomware, identity theft) and has not eliminated cybersecurity threats. Universal encryption does not exist.

Question 132 — Big Idea 3: Algorithms and Programming | Select TWO
A programmer wants to determine if a list contains any negative numbers. Which of the following code segments would correctly accomplish this task? Select TWO.
Question 133 — Big Idea 5: Impact of Computing | Select TWO
Which of the following are potential negative consequences of widespread facial recognition technology deployment in public spaces? Select TWO.
Question 134 — Big Idea 4: Computing Systems and Networks | Select TWO
Which of the following are characteristics of packet switching, the method used to transmit data over the Internet? Select TWO.
Question 135 — Big Idea 2: Data | Select TWO
A researcher is analyzing a large dataset of customer transactions. The dataset includes purchase amounts, but 15% of the rows have missing or invalid values in the "purchase_amount" field. Which of the following are reasonable strategies for handling this missing data? Select TWO.
Question 136 — Big Idea 3: Algorithms and Programming | Select TWO
A student writes a procedure to calculate the sum of all even numbers in a list. Which of the following implementations would correctly accomplish this? Select TWO.
Question 137 — Big Idea 1: Creative Development | Select TWO
A software development team follows an agile methodology. Which of the following are characteristics of agile development? Select TWO.

Stuck on Any Concepts? Get Expert Help

Work 1-on-1 with Tanner Crow, an experienced AP CSP teacher with proven results. His students consistently outperform national averages by 3–4x on the AP exam.

$150/hour (single session) | $125/hour (5-session package)

Book Your Tutoring Session
Warning: You have unanswered questions. Unanswered questions count as incorrect. You may still submit to see your results.
When you are ready, click Submit Exam to grade your answers and view detailed explanations.

Exam Complete!

--
-- of 67 questions correct
--

Review your answers and explanations below. Correct answers are highlighted in green; incorrect selections in red.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]