Courses › AP Math and CS
AP Computer Science Principles
Creative development, data, algorithms, computing systems and networks, and the impact of computing.
Study AP Computer Science Principles freeOpen in the app
Study it the fast way. Sign up free to turn this guide into flashcards, quick drills, practice quizzes and full practice tests that focus on what you miss, track your streak and race classmates live.
Creative development
Key terms
- Program
- a collection of instructions a computer carries out
- Algorithm
- a finite sequence of steps that solves a problem
- Iterative development
- a process of repeated cycles of designing, testing, and refining
- Debugging
- finding and fixing errors in a program
- Syntax error
- a mistake in the rules of the programming language
- Logic error
- a mistake that makes a program run but produce wrong results
- Runtime error
- an error that occurs while a program is executing
- Collaboration
- working with others, which can bring diverse perspectives to a project
- Comment
- text in code that explains it and is ignored by the computer
Key facts
- Pair programming involves one person driving while the other navigates
- Testing a program with boundary inputs helps find edge cases
- User input and a program's response together form an event driven design
- Documenting code with comments makes it easier to maintain
Data
Key terms
- Bit
- the smallest unit of data, either 0 or 1
- Byte
- a group of eight bits
- Binary
- a base-2 number system
- Lossless compression
- reducing file size while allowing exact restoration of the original
- Lossy compression
- reducing file size by discarding some data permanently
- Metadata
- data that describes other data
- Overflow error
- an error when a value is too large for the bits available
- Round-off error
- error caused by limits on how precisely a value can be stored
- Abstraction
- hiding detail to focus on the essential features
Key facts
- A byte contains 8 bits
- The binary number 1010 equals 10 in decimal
- The number of different values n bits can represent is 2 to the power n
- Representing analog data digitally requires sampling it at intervals
- Converting decimal 5 to binary gives 101
Algorithms and programming
Key terms
- Variable
- a named storage for a value that can change
- Selection
- using a condition to choose which code to run
- Iteration
- repeating a set of steps
- List
- an ordered sequence of elements in a program
- Procedure
- a named group of instructions that may take parameters and return a value
- Parameter
- a variable that receives a value passed into a procedure
- Binary search
- a search that repeatedly halves a sorted list
- Heuristic
- a practical approach that gives a good answer when an exact one is too slow
- Undecidable problem
- a problem for which no algorithm can always give a correct answer
Key facts
- The three basic building blocks of any algorithm are sequencing, selection, and iteration
- Binary search only works on a sorted list
- An algorithm that takes time proportional to n squared is of polynomial time
- Algorithms that take exponential time are generally considered unreasonable
- A random value is produced by a random number generator
Computer systems and networks
Key terms
- Internet
- a worldwide network of connected computer networks
- Protocol
- an agreed set of rules for communication
- IP address
- a unique number identifying a device on a network
- Router
- a device that forwards data packets between networks
- Packet
- a small chunk of data sent across a network
- Redundancy
- having multiple paths so a network keeps working if one fails
- Fault tolerance
- the ability of a system to keep working despite failures
- Parallel computing
- running parts of a task at the same time on multiple processors
- Distributed computing
- using multiple devices to work on a problem together
Key facts
- The protocol that breaks data into packets and ensures reliable delivery is TCP
- The system that translates domain names into IP addresses is DNS
- Speed of data transfer is measured as bandwidth
- The time it takes data to travel from source to destination is latency
- The speedup from parallel computing is limited by the sequential portion of a task
Impact of computing
Key terms
- Digital divide
- the gap between people who have access to technology and those who do not
- Crowdsourcing
- gathering ideas or work from a large group of people online
- Phishing
- tricking users into revealing sensitive information through fake messages
- Malware
- software designed to harm or exploit a device
- Encryption
- scrambling data so only authorized parties can read it
- Public key encryption
- a system using one key to encrypt and a different key to decrypt
- Multifactor authentication
- requiring two or more kinds of proof to log in
- Open source
- software whose source code is freely available to use and modify
- Creative Commons
- a licensing system that lets creators allow others to reuse their work
Key facts
- Bias in algorithms can result from biased training data
- Software that records keystrokes secretly is called a keylogger
- A copyright gives creators legal control over their original works
- Data that can identify a person is called personally identifiable information
More AP Math and CS courses
AP Calculus ABLimits, derivatives and integrals of single-variable functions, with applications and the Fundamental Theorem of Calculus.AP Calculus BCEverything in AB plus parametric, polar and vector calculus, advanced integration, Euler's method and infinite series.AP PrecalculusFunctions and their behavior: polynomial, rational, exponential, logarithmic, trigonometric, polar, parametric, vector and matrix topics.AP StatisticsDescribing data, designing studies, probability, and inference for proportions, means, and relationships.AP Computer Science AJava programming: classes, control flow, arrays, ArrayList, inheritance, recursion, sorting, and searching.