Cram Time

Courses › AP Math and CS

AP Computer Science Principles

Creative development, data, algorithms, computing systems and networks, and the impact of computing.

APAP Math and CS5 units68 items

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

  1. Pair programming involves one person driving while the other navigates
  2. Testing a program with boundary inputs helps find edge cases
  3. User input and a program's response together form an event driven design
  4. 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

  1. A byte contains 8 bits
  2. The binary number 1010 equals 10 in decimal
  3. The number of different values n bits can represent is 2 to the power n
  4. Representing analog data digitally requires sampling it at intervals
  5. 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

  1. The three basic building blocks of any algorithm are sequencing, selection, and iteration
  2. Binary search only works on a sorted list
  3. An algorithm that takes time proportional to n squared is of polynomial time
  4. Algorithms that take exponential time are generally considered unreasonable
  5. 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

  1. The protocol that breaks data into packets and ensures reliable delivery is TCP
  2. The system that translates domain names into IP addresses is DNS
  3. Speed of data transfer is measured as bandwidth
  4. The time it takes data to travel from source to destination is latency
  5. 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

  1. Bias in algorithms can result from biased training data
  2. Software that records keystrokes secretly is called a keylogger
  3. A copyright gives creators legal control over their original works
  4. 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.