AP CSP Practice Exam 2 — Written Response (Section II)

AP CSP Practice Exam 2 — Written Response

Section II • 2 Questions • Time: 1 Hour • Mirrors 2024 AP Exam Format (Set 2)

Exam 2 — Written Response (Section II) ← Back to MCQ Section (70 Questions)

Section II Directions

Read each question carefully and completely. This section mirrors the 2024 AP CSP Section II format. Note that the exact prompts vary between exam administrations — this exam uses a different question set than Exam 1 so you practice both common prompt styles.

  • Question 1 (standalone — no PPR): Identify your program’s users and how it addresses their needs
  • Question 2 (3 parts, a/b/c): Refer to your Personalized Project Reference (PPR) — focuses on conditionals, procedure calls, and abstraction
  • Write your answers in the text boxes, then click Show Sample Response to compare
  • Toggle below to practice with the provided sample PPR or to use your own Create Task project
Personalized Project Reference (PPR)
About this PPR: On the real AP exam, your PPR is a printed document containing screenshots of your own Create Task code. The four segments below mirror the exact structure College Board requires. This program is different from Exam 1’s sample so you practice with fresh code.

Program: A Playlist Recommendation System that filters songs above a rating threshold and reports summary statistics.

PROCEDURE — Part (i)   Procedure Definition

Must include: a named procedure, parameter(s), and an algorithm with sequencing, selection, and iteration

PROCEDURE getRecommendations(songRatings, threshold) { recommended [] FOR EACH rating IN songRatings { IF (rating >= threshold) { APPEND(recommended, rating) } } RETURN(recommended) }
PROCEDURE — Part (ii)   Procedure Call

A call to the procedure above that accomplishes the program’s purpose

playlist [72, 85, 91, 60, 78, 95, 55, 88] moodThreshold 80 topSongs getRecommendations(playlist, moodThreshold) DISPLAY("Recommended songs: ") DISPLAY(LENGTH(topSongs))
LIST — Part (i)   How data is stored in the list

Shows data being assigned into the list

playlist [72, 85, 91, 60, 78, 95, 55, 88]
LIST — Part (ii)   How the list is used to fulfill the program’s purpose

The same list accessed and processed to accomplish something meaningful

total 0 FOR EACH r IN playlist { total total + r } average total / LENGTH(playlist) DISPLAY("Average rating: ") DISPLAY(average)

Using Your Own PPR

Have your printed or digital PPR open alongside this page. Your PPR must contain these four code segments:

  • Procedure (i): Your student-developed procedure — must include a conditional (IF/ELSE) statement, as Question 2(a) will ask about it
  • Procedure (ii): A call to that procedure within your program
  • List (i): Code showing how data is stored into your list
  • List (ii): Code showing that same list being used to fulfill your program’s purpose

All parts of Question 2 refer to your procedure and its parameters. Sample responses below describe what to address rather than specific code answers, since your program is unique.

Question 1 No PPR needed

Program Design, Function, and Purpose

Identify the expected group of users of your program. Explain how your program addresses at least one concern or interest of the users you identified.
Your Response:

Describe: (1) who the expected users of your program are, (2) what concern or interest they have, and (3) specifically how your program addresses that concern or interest.

Rubric: You must identify a specific user group AND connect a feature of your program to a concern or interest of that group. Generic answers (“people who want to use technology”) earn no credit. The connection between user need and program behavior must be explicit.

Sample Full-Credit Response (based on the sample PPR program):

The expected users of the Playlist Recommendation System are music listeners who want to quickly find high-quality songs from a large playlist without manually sorting through every track. A key concern of these users is efficiency — they do not want to listen to low-rated songs when they are in a specific mood. The program addresses this by allowing users to set a custom moodThreshold value. The getRecommendations procedure then automatically filters the playlist, keeping only songs with ratings at or above that threshold, and reports how many songs qualify. This saves users from manually reviewing each song’s rating.

Using your own PPR? Identify who would realistically use your program (students, athletes, shoppers, etc.), name one thing they care about, and point to a specific feature of your program that addresses it.

Need help before the real exam? Let’s work through it together.

11+ years of AP CS teaching experience • 1,845+ tutoring hours • 451 five-star reviews • $125/hr packages

Book a Session →
Question 2 Refer to your PPR for all parts

Conditionals, Procedure Calls, and Abstraction

Refer to your Personalized Project Reference when answering this question. Answer all three parts: (a), (b), and (c).
(a) Conditional Statement

Consider the first conditional statement in the Procedure section (i) of your PPR. Describe your conditional statement, including its Boolean expression. Describe what the procedure does in general when the Boolean expression of this conditional statement evaluates to false.

Rubric: You must (1) identify and describe the Boolean expression specifically and (2) describe the false branch behavior. Saying “if the condition is not met, it skips the IF block” is too vague. Explain what the procedure actually does when false — does it fall through to the next line? Skip the append? Return something different?

Sample Full-Credit Response (sample PPR — procedure: getRecommendations):

The first conditional statement is IF (rating >= threshold). Its Boolean expression compares the current song’s rating to the threshold parameter, evaluating to true if the rating meets or exceeds the threshold value.

When the Boolean expression evaluates to false (the song’s rating is below the threshold), the procedure does not execute the APPEND statement inside the IF block. The song’s rating is simply skipped, and the loop moves on to the next element in songRatings. As a result, low-rated songs are never added to the recommended list. For the sample call with moodThreshold = 80, ratings of 72, 60, 78, and 55 all cause the false branch and are excluded.

Using your own PPR? Identify your IF condition, write it out, and explain what the procedure does (or doesn’t do) when that condition is false. Trace a specific input that would make it false.
(b) Same Outcome from a Different Procedure Call

Consider the procedure and procedure call identified in parts (i) and (ii) of the Procedure section of your PPR. Describe the outcome that your procedure call is intended to produce.

Then, write a new procedure call with at least one different argument value that will produce the same outcome, if possible, and explain why. If it is not possible to produce the same outcome with different arguments, explain why this is not possible.

Rubric: You need (1) a clear description of the original outcome and (2) a valid new call with different argument(s) that produces the same outcome, with an explanation of why. Or a clear explanation of why the same outcome is impossible with different arguments. “Any call will work” is not sufficient — be specific.

Sample Full-Credit Response (sample PPR):

Original outcome: The call getRecommendations(playlist, moodThreshold) where playlist = [72, 85, 91, 60, 78, 95, 55, 88] and moodThreshold = 80 returns the list [85, 91, 95, 88] — a 4-element list containing only ratings of 80 or above.

New call with the same outcome: getRecommendations([85, 55, 91, 40, 95, 88], 80)

This call passes a different songRatings list but uses the same threshold. The procedure filters out 55 and 40 (both below 80) and returns [85, 91, 95, 88] — the same four-element list as the original outcome. The same outcome is produced because the same four qualifying ratings appear in both lists and the threshold is identical.

Using your own PPR? Describe what your call returns or produces. Then think: what argument change keeps the result the same? (e.g., adding an element that doesn’t affect the output, or changing a value that doesn’t alter the final result.)
(c) Parameters and Abstraction

Consider the procedure identified in part (i) of the Procedure section of your PPR. Identify the parameter(s) used in this procedure. Explain how your identified parameter(s) use abstraction to manage complexity in your program.

Rubric: You must (1) name the parameter(s) and (2) explain specifically how they create abstraction that manages complexity. The key word is complexity — explain what would be more complex or repetitive without the parameters. Contrast with a hardcoded alternative.

Sample Full-Credit Response (sample PPR):

The procedure getRecommendations uses two parameters: songRatings and threshold.

These parameters create abstraction that manages complexity in the program. Because songRatings is a parameter, the procedure can filter any playlist — not just the specific playlist variable. A different playlist could be passed in without modifying the procedure at all. Similarly, because threshold is a parameter rather than a hardcoded value, the program can produce recommendations at any quality bar (70, 80, 90) by changing only the argument in the call, not the procedure itself.

Without these parameters, the program would need a separate, nearly identical procedure for each playlist or threshold value, dramatically increasing code length and making the program harder to update or debug. The two parameters reduce this repetition by allowing one general-purpose procedure to replace many specific ones.

Using your own PPR? Name your parameters and explain what would need to be hardcoded or repeated if those parameters didn’t exist. The more calls your procedure can serve with different arguments, the stronger your abstraction argument.

Ready to Lock in a 5?

34.8% of my AP CSP students score 5s — nearly 4x the national average of 9.6%. One session can change your entire approach to the Written Response.

$150/hr single session • $125/hr with a 5-session package • Venmo, Zelle, PayPal, or card

← MCQ Section Exam 2 — 70 MCQ + Written Response Complete AP CSP Resources →

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

tanner@apcsexamprep.com

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at tanner@apcsexamprep.com