AP Computer Science Principles study materials
AP Computer Science Principles study resources

AP Computer Science Principles key terms

AP Computer Science Principles · Get comfortable with the vocabulary.

Algorithm

A finite, ordered set of unambiguous steps that, when followed, accomplishes a task or solves a problem. Algorithms can be expressed in pseudocode, diagrams, or a programming language before being coded.

Related: Pseudocode, Iteration, Sequencing
Abstraction

Reducing complexity by hiding unnecessary detail and exposing only what matters for a given purpose. In programming, procedures and libraries are abstractions that let you use functionality without knowing its internals.

Related: Procedure, Modularity
Procedure

A named, reusable block of code that performs a specific task and can accept parameters and return a value. Procedures let programmers avoid duplicating logic and make programs easier to read and maintain.

Related: Parameter, Return Value, Modularity
Parameter

A named input declared in a procedure's definition that receives a value when the procedure is called. The matching value supplied by the caller is called an argument.

Related: Procedure, Return Value
Return Value

The result a procedure sends back to the code that called it, produced by a return statement. A procedure without a return value is used only for its side effects, such as displaying output.

Related: Procedure, Parameter
Boolean Expression

An expression that evaluates to exactly one of two values, true or false, typically built with comparison operators such as equals, less than, and greater than, and combined with logical operators AND, OR, and NOT.

Related: Conditional Statement, Iteration
Conditional Statement

A control structure that runs a block of code only when a specified Boolean expression is true, optionally running an alternative block otherwise. It lets a program choose among different paths of execution.

Related: Boolean Expression, Sequencing
Iteration

Repeating a block of statements multiple times, either a known number of times with a loop or until a condition becomes false. Iteration is how programs process lists and perform repetitive work compactly.

Related: Infinite Loop, Algorithm
Infinite Loop

A loop whose ending condition never becomes false, so the repetition never stops and the program fails to finish. It commonly results from forgetting to update the variable that the loop condition tests.

Related: Iteration, Boolean Expression
Sequencing

Executing statements one after another in the order written, with each statement completing before the next begins. Sequencing is the default flow of control unless a conditional or loop changes it.

Related: Conditional Statement, Iteration
Pseudocode

A language-neutral, informal notation for describing an algorithm using structured English and common programming conventions. It communicates logic clearly without requiring the exact syntax of any real language.

Related: Algorithm, Code Segment
Code Segment

A short, self-contained portion of program code presented for analysis, such as a loop or procedure. Exam questions often ask you to trace a code segment's output or identify its purpose.

Related: Pseudocode, Iteration
Variable

A named storage location in a program that holds a value which can be read and changed while the program runs. A variable's name, scope, and current value all affect program behavior.

Related: Data Type, Assignment
Assignment

A statement that stores a value into a variable, replacing whatever the variable previously held. In pseudocode the arrow symbol is often used, meaning the value on the right is placed into the variable on the left.

Related: Variable, Data Type
Data Type

A classification of values that determines what operations are allowed and how values are stored, such as integer, decimal number, string, or Boolean. Mixing types carelessly can cause errors or unexpected results.

Related: Variable, String
String

A sequence of characters treated as a single value, such as a word, sentence, or identification code. Strings support operations like finding length, extracting substrings, and joining pieces together.

Related: Data Type, List
List

An ordered collection of elements stored under one name and accessed by index position, usually starting at index 1 in AP pseudocode. Lists can be traversed with loops to process every element.

Related: Index, Iteration
Index

A number identifying the position of an element within a list or string. In AP pseudocode the first element is at index 1, and accessing a position outside the valid range produces an error.

Related: List, String
Traversal

Visiting each element of a list or string exactly once, usually with a loop, to examine, count, or modify the data. Traversal patterns underlie searching, summing, and filtering operations.

Related: Iteration, List
Linear Search

A search that checks elements one at a time from the start until the target is found or the list ends. It works on unsorted data but may require examining every element.

Related: Binary Search, Traversal
Binary Search

A search that repeatedly halves a sorted list by comparing the target with the middle element. It is much faster than linear search on large sorted data but requires the data to be sorted first.

Related: Linear Search, Sorting
Sorting

Arranging data into a specified order, such as ascending numeric or alphabetical order. Sorting makes searching faster and makes data easier for people to interpret.

Related: Binary Search, Algorithm
Binary

A base-2 number system using only the digits 0 and 1, where each position represents a power of two. Computers represent all data, including numbers, text, images, and sound, as binary patterns.

Related: Bit, Byte, Data Compression
Bit

A single binary digit, either 0 or 1, which is the smallest unit of digital information. Grouping bits allows computers to represent larger numbers and more complex data.

Related: Binary, Byte
Byte

A group of eight bits treated as one unit. A byte can represent 256 distinct values, enough for a character code, and bytes are the common unit for describing file and memory sizes.

Related: Bit, ASCII
ASCII

A character encoding standard that maps letters, digits, punctuation, and control characters to numeric codes, historically using seven or eight bits per character. It covers English text but not most of the world's writing systems.

Related: Unicode, Byte
Unicode

A universal character encoding standard that assigns a unique code point to characters from essentially every writing system, plus symbols and emoji. It enables consistent representation of multilingual text across systems.

Related: ASCII, Data Compression
Data Compression

Reducing the number of bits needed to store or transmit data. Lossless compression preserves the original data exactly and can be reversed, while lossy compression discards some detail permanently for smaller size.

Related: Lossy Compression, Lossless Compression
Lossless Compression

A compression method that allows the original data to be reconstructed exactly from the compressed version. It is required for text, code, and other data where any change would break correctness.

Related: Lossy Compression, Data Compression
Lossy Compression

A compression method that permanently discards some information to achieve smaller file sizes, accepting reduced fidelity. It is common for images, audio, and video where small quality losses are acceptable to people.

Related: Lossless Compression, Data Compression
Metadata

Data that describes other data, such as file size, creation date, author, location, or format. Metadata helps organize, search, and interpret large collections of information without inspecting each item directly.

Related: Data Mining, Big Data
Big Data

Data sets so large or fast-growing that ordinary tools struggle to store and analyze them. Volume, velocity, and variety make big data valuable for pattern finding but challenging for privacy and accuracy.

Related: Data Mining, Metadata
Data Mining

Using computational techniques to discover patterns, correlations, and trends in large data sets. Results can inform decisions but may reflect bias in the data or produce misleading correlations.

Related: Big Data, Metadata
Data Bias

Systematic error in data collection, sampling, or interpretation that makes results unrepresentative of the population studied. Biased data can lead to unfair or inaccurate conclusions and harmful automated decisions.

Related: Data Mining, Algorithmic Bias
Algorithmic Bias

Unfair or systematically skewed outcomes produced by an algorithm, often because its training data, design choices, or objectives encode human biases. Such bias can affect hiring, lending, policing, and content recommendation.

Related: Data Bias, Data Mining
Internet

A global network of interconnected networks that communicate using shared protocols, allowing devices anywhere to exchange data. It is decentralized, with no single owner or controlling authority.

Related: Protocol, IP Address, Packet
Protocol

An agreed set of rules governing how data is formatted, addressed, transmitted, and acknowledged between devices. Common protocols include HTTP for web pages, TCP for reliable delivery, and IP for addressing.

Related: Internet, Packet, IP Address
Packet

A small chunk of a message, carrying addressing information and a portion of the data, that travels independently across a network. The receiver reassembles packets, which may arrive out of order or by different routes.

Related: Protocol, Router
Router

A network device that forwards packets between networks by reading destination addresses and choosing the next path. Routers let traffic flow around failures, which makes the Internet fault tolerant.

Related: Packet, Redundancy
IP Address

A numeric label assigned to a device on a network so data can be routed to it. Addresses must be unique within their network, and public addresses are coordinated globally.

Related: Internet, Protocol
Redundancy

Deliberately duplicating components, paths, or data so that failure of one does not stop the whole system. Redundant network routes and backup copies improve reliability and fault tolerance.

Related: Router, Fault Tolerance
Fault Tolerance

A system's ability to keep functioning, possibly at reduced capacity, when a component fails. Redundant paths and replicated data are common ways to achieve it in networks and servers.

Related: Redundancy, Router
Bandwidth

The maximum rate at which data can be transmitted over a connection, usually measured in bits per second. Higher bandwidth allows more data to move in the same amount of time.

Related: Latency, Packet
Latency

The delay between sending data and its arrival or effect, often measured in milliseconds. High latency makes interactive applications feel slow even when bandwidth is plentiful.

Related: Bandwidth, Packet
Encryption

Transforming readable data into an unreadable form using a key, so that only parties with the correct key can recover it. It protects confidentiality of data in transit and at rest.

Related: Symmetric Encryption, Public Key Encryption
Symmetric Encryption

An encryption scheme in which the same secret key both encrypts and decrypts data. It is fast and efficient, but the key must be shared securely between the parties in advance.

Related: Encryption, Public Key Encryption
Public Key Encryption

An asymmetric scheme using a publicly shared key to encrypt and a mathematically related private key to decrypt. It solves key distribution but is slower than symmetric encryption, so the two are often combined.

Related: Symmetric Encryption, Encryption
Creative Commons

A set of standardized public licenses that let creators grant permission to share and reuse their work under specified conditions, such as attribution or noncommercial use. It supports legal reuse while preserving some rights.

Related: Open Access, Intellectual Property
Open Access

The practice of making research, data, or creative works freely available online for anyone to read and often reuse. It broadens participation but raises questions about funding and quality control.

Related: Creative Commons, Intellectual Property
Intellectual Property

Legal rights over creations of the mind, including copyright, patents, and trademarks, that give creators control over use of their work. Digital copying makes enforcement and balance with public benefit contentious.

Related: Creative Commons, Open Access
Digital Divide

The gap between people who have reliable access to computing devices, internet service, and digital skills and those who do not. It affects education, employment, and civic participation.

Related: Open Access, Computing Innovation
Computing Innovation

A new or substantially improved artifact, system, or process that includes a program as a key part of its function, such as a mobile app or navigation service. Innovations bring benefits alongside intended and unintended harms.

Related: Digital Divide, Personally Identifiable Information
Personally Identifiable Information

Data that can be used, alone or combined with other data, to identify a specific individual, such as name, address, or account numbers. Its collection raises privacy and security obligations.

Related: Computing Innovation, Metadata
Debugging

The iterative process of finding, diagnosing, and fixing errors in a program. It relies on testing, reading error messages, tracing variable values, and isolating the smallest code that reproduces a problem.

Related: Code Segment, Infinite Loop
Modularity

Dividing a program into separate, self-contained pieces that can be developed, tested, and reused independently. It makes large programs easier to understand, debug, and extend.

Related: Procedure, Abstraction
Simulation

A program that models a real or hypothetical system over time to explore behavior or test scenarios. Simulations let people study situations that are too costly, slow, or dangerous to test directly.

Related: Algorithm, Modeling
Modeling

Creating a simplified representation of a system that captures the features relevant to a question. Models always involve assumptions and simplifications, so their outputs should be interpreted with those limits in mind.

Related: Simulation, Abstraction