Pseudocode

Pseudocode is an analytical and programming tool that we have at our disposal which we use to present algorithms as succinctly as possible, without getting lost in notions of syntax but rather by expressing them in our native, common language. Pseudocode can be an excellent launching point for writing in any number of languages, and that we can express certain concepts inherent in languages (such as variables, loops, conditions, and statements, among others) by doing so with pseudocode. Used correctly, thinking in pseudocode may also help find bugs in your program before you even begin writing a single line of code!

Important Note: AP Computer Science Principles is a deliberately language-agnostic course (Code on the exam will not be written in any specific language) . This means that the ability to express oneself in pseudocode and understand sample pseudocode is a critical skill. Be sure to take a look at the reference sheet given with the college board AP exam to familiarize yourself with their formatting.

  • Lecture

  • Notes

  • Supplementary Resources

  • Thought Questions

    • Why would we ever use pseudocode once we actually know how to code? What benefits does pseudocode provide that code perhaps doesn’t?
    • What disadvantages are there to using pseudocode when preparing algorithms and solutions to problems?
    • Can every algorithm be expressed in pseudocode?
    • Does pseudocode always have to be written as text-based? How else might we use pseudocode in preparing solutions to problems?