AP Comp Sci Principles – 2023 Cheat Sheet | 󰗒 See all AP CSP study guides | @thinkfiveable 🕹Unit 1 Creative Development Unit 2 Data 📱Unit 3 Algorithms & Programming Computing Innovation: an innovation that uses a program as a key part of their function. Computing Innovation 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 (ex: 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 party is fixed ● Program Documentation: a description of how something in your program works ● Comments: program doc. 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: ● Hand tracing: manually tracking your variables' values as your program goes along ● Print statements: printing out values to make sure they’re correct Data is 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 — important for AP CSP!! Binary Numbers ● 8 bits = 1 byte ● Hexadecimal is used for RGB color codes & it uses Base 16 Conversion Charts: Binary and Hexadecimal Data Representation ● ASCII code converts text to binary format ● Analog data is measured continuously & changes smoothly ● Digital data is 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 (ex: doubling every number/graphing data points) ● Cleaning data: making data uniform w/o changing meaning (ex: correcting misspelled words) ● Pseudocode will be used a lot on the MCQ section of the AP Exam, make sure to 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 ● Ex: 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 w/ 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 (ex: 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: ● Look at the exam reference sheet for the meaning of operators such as / and % ● MOD (%) gives you the remainder of 2 #’s Algorithms ● An algorithm has instructions that accomplish a task or solve a problem; created using sequencing, selection, and iteration Sequencing, Selection and Iteration ● Sequencing means that 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 AP Comp Sci Principles – 2023 Cheat Sheet | 󰗒 See all AP CSP study guides | @thinkfiveable 💻Unit 4 Computer Systems & Networks Unit 5 Impact of Computing 💯 Exam Tips 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; With 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: sequential solution time/parallel solution time 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 MCQs 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! Create Task 12+ hours in class work time | 30% of AP Exam Score | DUE: May 1st, 2023 @ 11:59 PM EDT ● 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!

robot