SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 3 · Algorithms & Programming Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science Principles Unit 3 Cheat Sheet

A one-page visual summary of Algorithms & Programming — every construct, operator, and exam trap you need, on a single screen.

← Back to Unit 3 hub

The basics

What it covers: Building programs from variables, expressions, conditionals, iteration, lists, and procedures, and reasoning about algorithms, searching, efficiency, and computability.

Exam weight: Big Idea 3 is about 30–35% of the AP CSP multiple-choice exam — the most of any big idea.

The big question: How do we design, express, and evaluate algorithms and programs that solve problems?

Computational thinking practices: Computational Solution Design, Algorithms & Program Development, Abstraction, Code Analysis, Computing Innovations, and Responsible Computing.

Key topics at a glance

Variables & Assignment

A variable stores a value; assignment (x ← value) updates it. Strings are character sequences that can be concatenated.

Expressions

Arithmetic (+, −, *, /, MOD = remainder). Boolean expressions use relational (=, ≠, <, >) and logical (AND, OR, NOT) operators.

Selection

Conditionals (if / if-else) choose which code runs. Nested conditionals test further conditions inside a branch.

Iteration

Loops repeat code — count-controlled (a set number of times) or condition-controlled (while/until a condition holds).

Algorithms

An algorithm is finite step-by-step instructions built from sequencing, selection, and iteration.

Lists

Lists hold ordered elements accessed by index. Operations: access, append, insert, remove, length. Traverse with a loop.

Searching

Linear search: check each element (any list). Binary search: halve a sorted list — much faster.

Procedures, Libraries & Limits

Procedures (with parameters/return) enable reuse & abstraction; libraries/APIs share them. Also: RANDOM, simulations, efficiency, and undecidable problems.

The key terms you must know

Key themes to remember

Common exam traps