Code.org list index vs AP Computer Science Principles Exam Reference Sheet

Why does Code.org index start at 0 when the AP Computer Science Principles Exam Reference Sheet has indexing start at 1.

(from AP Computer Science Principles Exam Reference Sheet)
Accesses the element of aList at index i. The first element of aList is at index 1 and is accessed using the notation aList[1].

Most of the popular languages like Python, Java, JavaScript, etc use 0 based indexing.

1 Like

Teachers ask this question often. To some degree, I think there is history at play. Starting at 1 used to be standard. But then along comes the C language that starts at 0. C starts at 0 so you can do address math just like in Assembler. C was designed to build operating systems. Then C becomes popular outside of systems programming. So popular that other languages want to be just like it. For good or evil, many new languages are based on C syntax. But true to its ancestral roots pseudo-code still starts at 1.