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)
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
Program: A Playlist Recommendation System that filters songs above a rating threshold and reports summary statistics.
Must include: a named procedure, parameter(s), and an algorithm with sequencing, selection, and iteration
A call to the procedure above that accomplishes the program’s purpose
Shows data being assigned into the list
The same list accessed and processed to accomplish something meaningful
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.
Program Design, Function, and Purpose
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.
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.
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
Conditionals, Procedure Calls, and Abstraction
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.
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.
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.
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.
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.
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.
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
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.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
tanner@apcsexamprep.com
Courses
AP CSA, CSP, & Cybersecurity
Response Time
Within 24 hours
Prefer email? Reach me directly at tanner@apcsexamprep.com