AP Computer Science Principles Exam Notes
Unit 1: Creative Development
- Computing Innovation: An innovation that uses a program as a key part of its function.
- Examples:
- Physical: Robots, tablets, smart tech
- Non-physical: Social Media, Video Games
- Collaboration:
- Allows for diverse ideas and thoughts that cater to different people.
- Pair Programming: When two people share one computer and take turns coding.
- Program Function and Purpose:
- Purpose: What a program is designed to do (e.g., solving problems, creative expression).
- Code Segments: A smaller collection of statements that are part of a program.
- Code Statements: Individual instructions.
- Program Inputs: Pieces of data (visual, auditory, touch, etc.) that a computer takes in and processes.
- Program Outputs: The data (same types as inputs) that the computer returns.
- Program Events: An action that gives a program data to respond to.
- Program Behavior: How a program will respond to a user interacting with it.
- Development Processes:
- Iterative Development Process: Develop working prototypes of a program and go back through the cycle to redevelop the program.
- Incremental Development Process: Break a problem into small parts and then reassemble the solution when each part is fixed.
- Program Documentation: A description of how something in your program works.
- Comments: Program documentation written directly into the program itself.
- Common Errors:
- Logic Errors: Unexpected behavior in program’s output.
- Syntax Errors: The code does not work properly because it is typed or written incorrectly.
- Run-Time Errors: Error occurs while code runs.
- Overflow Errors: The numbers are too big for the computer.
- Methods of Fixing Errors:
- Hand Tracing: Manually tracking your variables' values as your program goes along.
- Print Statements: Printing out values to make sure they’re correct.
Unit 2: Data
- Data: A collection of facts.
- Computing devices store data in bits (binary digits).
- Computers read machine code which is usually in the binary system.
- Abstraction: Reduces complexity by only focusing on the most important parts & hiding the irrelevant parts from the user.
- Binary Numbers:
- 8 \, bits = 1 \, byte
- Hexadecimal is used for RGB color codes & it uses Base 16.
- Data Representation:
- ASCII code converts text to binary format.
- Analog Data: Measured continuously & changes smoothly.
- Digital Data: Measured digitally and leaves out extra data by simplifying the data collected (form of abstraction).
- Data Compression:
- Data compression is dependent on 1) the method used and 2) the amount of repeated info in the data.
- Lossless Compression: Less compression & better file quality.
- Lossy Compression: More compression & worse file quality.
- Extracting Information from Data:
- Metadata: Data about data.
- Data Mining: Examining very large data sets to find information.
- Transforming Data: Editing or modifying data (e.g., doubling every number/graphing data points).
- Cleaning Data: Making data uniform without changing meaning (e.g., correcting misspelled words).
- Pseudocode: Review the AP CSP exam sheet and fully understand all of the pseudocode.
- Important: AP Pseudocode has an index that starts at 1!
- Data Types:
- Examples: Numbers, strings, lists, and booleans.
- Strings are an ordered list of characters ("hello world").
- Substrings are part of a string ("ello").
- String concatenation occurs when two strings or more are connected with a "+".
- List (array) an ordered sequence of elements.
- An element is an individual value in a list.
- All elements have an index: number that represents their position in the list (e.g., in the list [5,6,7], 5 is at index number 1 because it’s in the first position).
- Booleans: either True or False; go with the logical operators: NOT, AND, and OR.
- Loops traverse through lists/arrays/strings
- Mathematical Operators:
- MOD (%) gives you the remainder of 2 #’s
Unit 3: Algorithms
- Algorithms: An algorithm has instructions that accomplish a task or solve a problem; created using sequencing, selection, and iteration.
- Sequencing, Selection, and Iteration:
- Sequencing: All of the code is executed in the order they are written in.
- Selection: if statements: have conditions that need to be met for the selection to run
- Else statements are attached to if statements which specify what happens if a condition is not met
- Nested conditional statements have conditional statements inside of conditional statements
- Iteration: “repeat n times”/”repeat until”; you can use NOT, AND, and OR to write loops
- Binary Search: Type of algorithm used to search; works by splitting the data set and eliminates ½ the data with each round of splitting
- Procedures/Functions:
- Procedures are programming instructions that are also called methods or functions
- Parameters: input variables of a procedure
- Arguments: a procedure call with defined values
- You can call a procedure without knowing how it works: this is an example of abstraction
Unit 4: Computer Systems & Networks
- The Internet
- Internet = interconnection and networks
- computer network: when multiple computing devices (ex: computer, tablet) communicate with each other
- Data on the internet is split into data packets with metadata (data about the data packets) attached to each packet to tell the routers information
- Routing: the process of finding the best path to deliver information.
- Path: sequences of connected computing devices (routers) that begin at the sender and end at the receiver.
- Bandwidth: the rate of data transfer from one device to another; megabits per second
- Protocol: set of rules; the internet uses the TCP/IP and UDP protocols to communicate
- World Wide Web: a system of web-pages, programs, and files; runs on the Internet but is not the internet
- Scalability: the capacity to change in size and scale to meet new demands.
- Fault Tolerance
- Fault Tolerant: something can still function even w/ a partial malfunction
- Redundancy: duplication of things; helps make the internet fault tolerant
- Parallel and Distributed Computing
- Sequential Computing: traditional programming where each program is processed at a time
- Parallel Computing: when program is broken into smaller operations and processed at the same time using multiple processors
- Distributed Computing: multiple devices communicate together to run a program
- Sequential Solution: takes as long as the # of all steps in a program; if there are 3 steps of a, b, and c length, the sequential solution equals a + b + c
- Parallel Computing Solution: faster w less # of cores; if all steps are independent, find the solution that results in the minimum possible time
- Speedup of a Parallel Solution: \frac{sequential \, solution \, time}{parallel \, solution \, time}
Unit 5: Impact of Computing
- Key Concepts
- Digital Divide: gaps between those who have access to the internet and those who do not
- The things that affect this are demographics, socioeconomic status, and geographic location
- Computing Bias: computing innovations can reflect existing racial/gender/etc biases. Ex: recruiting algorithms that prefer one race or gender over another
- This is often because computers run on historical data, which reflects historical biases
- Intellectual Property: the work that people consider “theirs”
- Copyright: the person who created something determines who uses their creation
- Creative Commons: copyright license for creators to give others the ability to use their work
- Open-Sourcing: work is freely shared, distributed, and modified
- Open Access: research available to public w/ out restrictions
- Crowdsourcing: getting a large amount of input or information from people on the Internet.
- Citizen Science: scientific research that the general population helps to conduct.
- Digital Security
- Personally Identifiable Information (PII): information that can be used to identify you
- Virus vs Worm: Viruses are attached to infected files and must be activated by the user; worms can operate independently.
- Malware: malicious software that takes control of a system
- Phishing: tricks people into giving their personal information away by pretending to be a trustworthy group
- Multi-Factor Authentication: requiring multiple methods of verification.
- Encryption
- Encryption: encoding data to prevent others from accessing it
- Key: a secret piece of information used to encrypt data
- Symmetric Key Encryption: one key for both encrypting & decrypting
- Public Key Encryption: public key to encrypt & private key to decrypt
Exam Tips
- MCQs (Multiple Choice Questions):
- 120 minutes (2 hrs) | 70 multiple choice questions | 70% of AP Exam Score
- Pace yourself! You have around 1.7 minutes for each question so make sure to keep track of the time.
- If you are confused on a question, skip and come back later. If you cannot understand a question within 5-10 seconds of reading it, try to answer other questions first.
- If necessary, guess. College Board does not have a guessing penalty (points are only rewarded if earned, not taken away if answered incorrectly.
- Read the AP CSP reference sheet ahead of time for easy use on the AP Exam.
- Find and use practice questions! Practice makes perfect!
- Performance Task
- 9 hours in class work time | 30% of AP Exam Score
- Work ahead of time! Try to avoid submitting your Create Task late to avoid technical errors.
- Before submitting, review the scoring guidelines on the College Board website to make sure you have fulfilled the requirements for each row on the rubric.
- To make sure your Create Task is completed properly, view the sample responses on the College Board Website and cross reference and compare your work to the samples.
- Any examples or samples you see, write down to make sure you do not accidentally plagiarize. A Create Task that is flagged for plagiarism will receive a score of 0.
- Be confident in your work! You have gone through this class for an entire year & are prepared!