AP pseudocode indexes from 1. Every distractor in this bank is what you get from indexing from 0 or from forgetting that the list shifts.
Applied Practice
6 questions · scenario driven · every answer is recorded for your teacher
Question 1 of 6Trace
The list nums holds [10, 20, 30, 40]. What is nums[3]?
Incorrect. 40 is nums[4], the fourth element, which is what index 3 would give in a language that counts from 0.
Incorrect. The index itself is not the value stored there.
Incorrect. 20 is nums[2] under AP pseudocode indexing.
Correct. AP pseudocode indexes from 1, so the third element is 30.
Question 2 of 6Trace
The list L holds [7, 8, 9]. After REMOVE(L, 1), what does L hold and what is LENGTH(L)?
Incorrect. This removes the last element, which would be index 3.
Incorrect. REMOVE changes the list rather than leaving it alone.
Correct. Removing at index 1 takes out the first element, and the remaining elements shift down to fill positions 1 and 2.
Incorrect. This removes the middle element, which would be index 2.
Question 3 of 6Apply
The list L holds [1, 2, 3]. What does L hold after APPEND(L, 4) followed by INSERT(L, 1, 0)?
Incorrect. Inserting at index 1 places the value before the current first element, not after it.
Correct. APPEND puts 4 at the end, then INSERT at index 1 places 0 at the front and shifts everything else right.
Incorrect. This appends both values instead of inserting the second at index 1.
Incorrect. This drops the appended 4.
Question 4 of 6Debug
A loop over a list of length 5 crashes on its last pass.
Which loop bound is the likely cause?
Correct. Reaching index 6 on a 5 element list is an access past the end, which is the crash described.
Incorrect. This stops one element early, which silently skips the last element rather than crashing.
Incorrect. FOR EACH cannot run past the end, since it is defined by the list itself.
Incorrect. This is the correct bound for 1 based indexing and does not crash.
Question 5 of 6Analyze
A program removes elements from a list while looping over it by index from 1 upward.
What goes wrong?
Incorrect. Removal does not lock the list.
Incorrect. The loop terminates. It simply skips elements on the way.
Incorrect. Removal changes the positions the loop is indexing into, so they are not independent at all.
Correct. When an element is removed, the next element slides into the current index while the loop moves to the next index, so that element is never examined.
Question 6 of 6Transfer
Which expression accesses the LAST element of a list named L, regardless of its length?
Incorrect. AP pseudocode has no index 0.
Incorrect. Index 1 is the first element.
Correct. With 1 based indexing, the number of elements is also the index of the last one.
Incorrect. This is the correct form for 0 based languages, where it lands one short here.
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.
34.8% of Tanner’s CSP students score 5s. The national average is 9.6%.
I’m a Student
I’m a Teacher
✓Free AP CSP Big Ideas cheat sheet (PDF)
✓Daily practice questions covering all 5 Big Ideas
✓Create Task tips that actually work — from a real AP teacher
✓Free class codes with student progress tracking
✓3 full practice exams + Top 100 questions for your class
✓Create Task guidance and pseudocode reference sheets
Which AP CS exams are you prepping for?
✓
You’re in!
Your Big Ideas cheat sheet is on its way.
No thanks, I’ll figure it out myself
Avg student improvement: 2+ score levels | Real AP teacher, not just a tutor
AP Cybersecurity — National Launch 2026–27
Get Early Access to AP Cyber
AP Cyber launches nationally fall 2026. Get in early to help shape the course — start free with Unit 1 and the free teacher gradebook.
✓
You’re in — you’re on the AP Cyber early-access list!
Tanner will follow up personally within 48 hours. Your feedback will directly shape what gets built.
Step 1 of 4
Early Access — Limited Spots
Who are you?
Are you a teacher or a student?
I’m a Teacher
I’m a Student
Free to start — Unit 1 and the teacher gradebook are always free, no credit card.
Founding teachers unlock all 5 units and get direct input on what we build.
Not interested right now
Step 2 of 4
Your School
Tell us about your class
Other AP CS courses you teach
Your Situation
Tell us about yourself
Step 3 of 4
Classroom Needs
What does your classroom need? (select all that apply)
How You Study
What would help you most? (select all that apply)
Step 4 of 4
Almost Done
Where should we send your early-access details?
Free gradebook + Unit 1 | Your feedback shapes the course | Built by a real AP teacher