AP Pseudocode List Indexes start at 1?

Can someone please confirm that Lists in AP Pseudocode start their indexing at 1, rather than 0?

If so, this seems ridiculous to me. We spend the whole class working with Javascript as the default language in Code Studio and teach students along the way how to deal with indexing that starts at 0.

I get that students who truly grasp the content at a high level can shift back and forth to accommodate different indexing schemes, but AP tests are hard enough. Why introduce the added complexity? I believe this difference will do a better job of neededlessly confusing students instead of assessing their grasp of the List concepts.


Yes, AP Pseudocode starts list indexing at 1. I feel your frustration. On every practice question or test question, I had a reminder about this. Hopefully, they will get used to both by the time they get to the AP Exam.

1 Like

Hi Sangeeta - Thanks for the reply. Sigh. I’ll have to follow your suggestion to include reminders and practice for the rest of the year. Do you know if College Board has received feedback on this issue?

– Randy

Hi Randy, I don’t know! You can always post in the AP CSP community. One more voice would be good :slight_smile:


From a historical perspective, arrays being indexed starting with 1 is normal. Indexing starting with zero came from C. It had to do with pointers and pointer arithmetic, which was allowed in C. Since C is the syntax all language designers want to emulate, but this time get it right, we have indexing at 0 being spread like a virus. Javascript was infected by C syntax even though the designer wanted a language like Scheme. Since App Lab uses a 3rd party Javascript interpreter App Lab is now infected as well.

Since pseudo-code predates C it indexes from 1 as it should.

Javascript is the problem. There is no reason for it to index from 0. App Lab could be changed to index from 1, but it would be a large effort and make it incompatible with older App Lab programs and the Javascript standard.

1 Like

Thanks for the comments. I can appreciate the historical context and how different languages have different indexing schemes. I graduated in Computer Science from Santa Clara waaay back in 1987, so we saw all kinds of approaches to list/array management.

My point, though, is that we spend all year teaching with Javascript (or Java for CSP - A) and indexing at 0. AP should get with the times and current approaches in industry…all of which I’m familiar with use indexing schemes that start with 0.

Note that the College has maintained that there is nothing on the AP Exam that will trip up a student between 0 indexed and 1 indexed arrays. I have not found any question or example code on any practice exam where it matters.

Leaving history aside, I disagree. Indexing from 1 is easier to conceptualize and learn. I think we should change App Lab to start at 1.

It is not unusual for me to create Arrays in App Lab that start at 1. You just ignore the 0th item.

We teach number systems that start counting at 0…binary, hex, etc. java starts indexing at 0, c and JavaScript start indexing at 0. I’d rather teach it consistently and the way it’s used in industry and not have to “ignore” a valid index value.