0% found this document useful (0 votes)
12 views

AP CSP Crunch Sheet

The document is a review guide for the AP Computer Science Principles exam, covering key concepts such as creative development, data, algorithms, computer systems, and the impact of computing. It includes definitions of important terms, types of errors in programming, data compression methods, and various algorithms. Additionally, it discusses the implications of computing innovations, legal usage of materials, and security measures against cyber threats.

Uploaded by

cissp4all
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

AP CSP Crunch Sheet

The document is a review guide for the AP Computer Science Principles exam, covering key concepts such as creative development, data, algorithms, computer systems, and the impact of computing. It includes definitions of important terms, types of errors in programming, data compression methods, and various algorithms. Additionally, it discusses the implications of computing innovations, legal usage of materials, and security measures against cyber threats.

Uploaded by

cissp4all
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

AP Computer Science Principles Exam Review

Big Idea 1: Creative Development


Program A logic error is a A syntax error is a A run-time error An overflow error
Development: mistake in the mistake in the rules is a mistake in the is an error that
 investigating and algorithm of the programming program that occurs occurs when a
reflecting language during the computer attempts
 designing Ex. Trying to loop execution of a to handle a number
 prototyping through a list but Ex. Leaving off a program that is outside of
 testing forgetting the last semicolon at the the defined range of
element end of a statement Ex. User inputs a values.
value that causes an
error Ex. You multiply
two integers but the
result is too large
Big Idea 2: Data
When presented with scenarios that describe data and metadata for analysis you will be asked to determine
what information can be found, as well as a potential programming process that can be used to extract
information or modify the existing data.

Metadata are Cleaning data is a Bias occurs due toSequential Computing: Each task is
data about data. process that makes the type of source of the
executed one at a time
Ex. Data is an data uniform without data being collected.
Parallel Computing: Breaks a
image and changing their
program up into sequential tasks and
metadata is the meaning. More data does NOT
location and Ex. Changing all the eliminate bias. runs them at the same time.
date the picture responses in a form Speedup: sequential time divided by
was taken. asking for height into parallel time
the same units Distributed Computer: Multiple
devices are used to run a program.
Data compression algorithms are often used to maximize storage space or to transmit data over the Internet,
but sometimes at a cost to the quality of the data.

Important Terms:
 Lossless data compression algorithms can usually reduce the number of bits stored or transmitted
while guaranteeing complete reconstruction of the original data.
 Lossy data compression algorithms can significantly reduce the number of bits stored or transmitted
but only allow reconstruction of an approximation of the original data.
 Abstraction is the process of reducing complexity by focusing on the main idea.
 A bit is a binary digit, either 0 or 1.
 A byte is a sequence of 8 bits.
 Roundoff error results when the number of bits is not enough to represent the number with full
precision (like using 3 digits to represent pi as 3.14).
 Analog data are values that change smoothly, rather than in discrete intervals, over time. For
example, the pitch and volume of a live concert.

Binary (Base 2) to Decimal (Base 10) Decimal (Base 10) to Binary (Base 2)
©Goldie's Math Emporium
101110 48
48  2 = 24 R 0 110000
5 3
2 +2 +2 +2
2 1
24  2 = 12 R 0
32 + 8 + 4 + 2 12  2 = 6 R 0
46 62=3R0
32=1R1
12=0R1
Big Idea 3: Algorithms and Programming
On the AP Exam, you will be asked to determine the result or functionality of code. You will have your
reference sheet available to you. Read over the information below and also be familiar with the contents of
that reference sheet.
Variables
 A variable is an abstraction inside a program that can hold a value. Each variable has associated data
storage that represents one value at a time, but that value can be a list or other collection that in turn
contains multiple values.
Data Abstraction
 A list is an ordered sequence of elements. An element is an individual value in a list that is assigned a
unique index. An index referencing the position in a list, using natural numbers (in this class, index
starts at 1).
Mathematical Expressions
 The order of operations used in mathematics applies when evaluating expressions. The MOD operator
has the same precedence as the * and / operators.

12 MOD 2 13 MOD 2 23 MOD 5


2 goes into 12 evenly 2 goes into 13 evenly 6 times, 5 goes into 23 4 times, with 3 left
12 MOD 2 = 0 with 1 left over over

13 MOD 2 = 1 23 MOD 5 = 3

Boolean Expressions
 A Boolean value is either true or false. Relational operators are used to test the relationship between
two variables or expressions.
 Logical operators NOT, AND, and OR compare boolean expressions.
 Truth tables are NOT on the AP exam, but can help you evaluate more complex expressions and logic
gates.

Truth Table:
A B A || B A && B !A !A || (A && B) B && (!A || B)

T T T T F T T
T F T F F F F
F T T F T T T

F F F F T T F

©Goldie's Math Emporium


Conditionals Iteration
 Selection determines which parts of an  Iteration is a repeating portion of an algorithm.
algorithm are executed based on a  Repeat n Times – the block of statements is
condition being true or false. executed n times
 if statements – a block of code will  Repeat Until – the block of statements is repeated
execute if the condition is true, or (if it UNTIL the condition becomes true
is in the code) the else statement will
execute if the condition is false.

Searching Algorithms
 Linear (sequential) search algorithm checks each element of a list, in order, until the desired value
is found or all elements in the list have been checked.
 Binary search algorithm starts at the middle of a sorted data set and eliminates half of the data by
checking if the desired value falls above or below the middle value; this process repeat until the
desired value is found or all elements have been eliminated.
Binary search is often more efficient than linear search when applied to sorted data.

Calling Procedures
 A procedure is a named group of programming instructions that may have parameters and return
values.
 Procedural abstraction allows a solution to a large problem to be based on the solutions of smaller
subproblems. This is accomplished by creating procedures to solve each of the subproblems.

Algorithmic Efficiency
 An algorithm’s efficiency is determined through formal or mathematical reasoning.
 Algorithms with a polynomial efficiency or slower (constant, linear, square, cube, etc.) are said to run
in a reasonable amount of time. Algorithms with exponential or factorial efficiencies are examples of
algorithms that run in an unreasonable amount of time.
 A heuristic is an approach to a problem that produces a solution that is not guaranteed to be optimal
but may be used when techniques that are guaranteed to always find an optimal solution are
impractical

Big Idea 4: Computer Systems and Networks


You will be presented with scenarios for how information could be passed via the Internet along with
illustrations of interconnected computers in given networks. You will be asked to select which choice best
explains how information is passed through these networks from one computing device to another or how
designing systems to include redundancy helps make them fault-tolerant. You will also be asked a lot of
questions involving vocab and understanding of how the Internet functions.

The Internet is a computer network The Internet was


The bandwidth of a
consisting of interconnected networks designed to be
computer network is
Routing is the that use standardized, open scalable: it can
the maximum amount
process of finding a communication protocols, which change in size and
of data that can be sent
path from sender to allows users to easily connect scale to meet new
in a fixed amount of
receiver. additional computing devices to the demands (such as
time (measured in bits
Internet. IP and TCP are common additional devices
per second)
protocols used on the Internet. connecting to it)

©Goldie's Math Emporium


Redundancy is the The World Wide Packets contain a chunk of data and When a system can
ability to mitigate Web is a system of metadata used for routing the packet support failures and
failure of a system if linked pages, between the origin and the still continue to
other components programs, and files. It destination. They may arrive at the function, it is called
fail. uses the Internet and destination in order, out of order, or fault-tolerant.
Ex. having more than HTTP is a protocol not at all.
one path between any used.
two connected
devices.
Big Idea 5: Impact of Computing
 Computing innovations can be used in ways that their creators had not originally intended:
o The World Wide Web was originally intended only for rapid and easy exchange of information
within the scientific community.
o Targeted advertising is used to help businesses, but it can be misused.
o Machine learning and data mining have enabled innovation in medicine, business, and science,
but information discovered in this way has also been used to discriminate against groups of
individuals
 The “digital divide” refers to differing access to computing devices and the Internet, based on
socioeconomic, geographic, or demographic characteristics.
 Computing innovations can reflect existing human biases because of biases written into the algorithms
or biases in the data used by the innovation.
 Crowdsourcing is the practice of obtaining input or information from a large number of people via
the Internet. Ex. Waze
 Some examples of legal ways to use materials created by someone else include:
o Creative Commons -- a public copyright license that enables the free distribution of an
otherwise copyrighted work. This is used when the content creator wants to give others the right
to share, use, and build upon the work they have created.
o open source -- programs that are made freely available and may be redistributed and modified
o open access -- online research output free of any and all restrictions on access and free of many
restrictions on use, such as copyright or license restrictions
 Encryption is the process of encoding data to prevent unauthorized access. Decryption is the process
of decoding the data. Two common encryption approaches are:
o Symmetric key encryption involves one key for both encryption and decryption. Ex. Cesar
Cipher
o Public key encryption pairs a public key for encryption and a private key for decryption. The
sender does not need the receiver’s private key to encrypt a message, but the receiver’s private
key is required to decrypt the message (HTTPS)
 Certificate authorities (CA) issue digital certificates that validate the ownership of encryption keys
used in secure communications and are based on a trust model
 A computer virus is a malicious program that can copy itself and gain access to a computer in an
unauthorized way.
 Malware is software intended to damage a computing system or to take partial control over its
operation.
 Phishing is a technique that attempts to trick a user into providing personal information. That
personal information can then be used to access sensitive online resources, such as bank accounts and
emails.
 Keylogging is the use of a program to record every keystroke made by a computer user in order to
gain fraudulent access to passwords and other confidential information.
 A rogue access point is a wireless access point that gives unauthorized access to secure networks.

©Goldie's Math Emporium

You might also like