Browse all practice questions for the CodeHS AP Computer Science Principles (CSP) Practice Exam. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

CodeHS AP Computer Science Principles (CSP) Practice Exam course image
More practice questions

These questions are part of the practice quiz. Start practicing

  • Which statement best describes a key property of lossless compression, and give examples?
  • Complete the term: domain name ________.
  • What term describes a number assigned to any device connected to the internet?
  • In digital graphics, which term refers to the color model that combines red, green, and blue channels to produce colors?
  • Why is it important to create test cases that cover edge cases like empty inputs or very large inputs?
  • Which encryption method uses different keys for encryption and decryption?
  • Which hex code is used to represent the color white in 32-bit hex notation?
  • Which statement about hashing with salt is true?
  • What is the effect of a clear, descriptive function name on debugging?
  • What is the term for a value passed to a function to customize it?
  • Which number system uses 16 distinct symbols: 0-9 and A-F?
  • Which control structure implements conditional statements in many programming languages?
  • Which operator is used to compare two values and returns a Boolean result, distinct from the assignment operator?
  • Which is a counting-based loop that increments a variable each iteration?
  • Which term describes information about a file such as its size, color depth, and resolution?
  • What is the purpose of a library in programming?
  • What mathematical operation returns the remainder after division?
  • Which base uses digits 0-7?
  • Which compression discards information to reduce size and cannot recover the discarded data?
  • What is the time complexity of a linear search on an unsorted list of n elements?
  • A single value of either TRUE or FALSE is called a
  • Why do network protocols use layering?
  • One Megabyte is equal to how many Kilobytes?
  • Which term describes the process of repeating steps toward a final result?
  • What is the time complexity of nested loops where the inner loop runs n times for each of n iterations?
  • What is the fundamental unit of a digital image, typically a tiny square or dot that contains a single point of color?
  • Which concept is defined as simplifying problems by focusing on general features and ignoring details?
  • Which statement about global scope is true?
  • Which protocol is used for transmitting web pages over the Internet?
  • What best describes an API in software development?
  • What is the single unit of information in a computer?
  • Which practice involves finding and fixing problems in your algorithm or program?
  • Which statement best describes HTTP GET requests?
  • What operation is used to join text strings together, such as "Hello, " + name?
  • Which statement best describes the difference between latency and bandwidth in network performance?
  • What does scalability mean in a computing system?
  • If a loop processes n items with constant work per item, and you double n, what happens to the total work?
  • Which protocol ensures reliable, ordered delivery of a data stream between hosts?
  • What information does a histogram convey about a data set?
  • Which symbol represents the 'and' logical operator?
  • Which encryption method uses a fixed substitution of letters with no repeating patterns, producing ciphertext?
  • What is the name of a cipher that encrypts text by applying a series of alphabetical shifts based on a keyword?
  • Which extension is a lossless image format widely used on the web?
  • What principle states that all Internet traffic should be treated equally by Internet Service Providers?
  • Which numbering system uses digits 0-9?
  • Which statement about a library in programming is true?
  • How many bits are needed to uniquely represent 1,024 distinct values, and why?
  • What process reverses encryption to reveal the original plaintext?
  • What do you call a block of code that you can call repeatedly and that returns a value?
  • What did Moore's Law claim about transistor counts on integrated circuits, and is it continuing at the same pace today?
  • Which extension denotes an uncompressed audio file format?
  • Which pair of words best completes the sentence: Higher level protocols use lower levels without needing to understand precisely how they work?
  • If you implement a function max3(a, b, c) using nested if statements, what should it return?
  • Which concept describes the comparison of the popularity of topical queries in an online search engine over time?
  • Which term describes joining text strings together (e.g., "Hello" + name)?
  • Which pair of words best completes the sentence: Lower level protocols guarantee higher level protocols will function without stating specifically how this will be accomplished?
  • What happens if you access an array index equal to the array length in languages like JavaScript?
  • Which category of programming language provides little or no abstraction from hardware and maps closely to processor instructions?
  • What is the term for the number of bits that are conveyed or processed per unit of time?
  • Which document typically accompanies a dataset to provide context, purpose, and provenance?
  • Which extension denotes a lossless image format widely used for web graphics with transparency support?
  • If a JavaScript function does not return a value, what is returned by default?
  • Which term best describes a preliminary sketch or model used before building the final product?
  • The number of bits conveyed per unit of time is called the bit rate.
  • Why does using a longer symmetric key generally increase security?
  • Which color model uses varying intensities of red, green, and blue light to reproduce colors?
  • DNS stands for Domain Name System.
  • Which of the following is an example of a lossless image compression format?
  • Which term describes extremely large datasets that traditional data processing methods can't handle?
  • What service translates URLs to IP addresses?
  • Which term refers to describing a system by focusing on essential aspects and ignoring details?
  • When would you choose a while loop over a for loop?
  • How do you access the third element of an array named arr in JavaScript?
  • Which encryption technique maps each letter to a chosen other letter?
  • Which term describes a question with only two possible answers?
  • Which term refers to creating simple representations of complex phenomena to help learn and communicate?
  • Which term describes a number system that uses 16 symbols, including A through F?
  • Which of the following is an example of a high-level programming language mentioned?
  • Which document provides background information about a dataset?
  • Which term best describes a technique that performs encryption?
  • What term describes a computation that groups rows from a dataset to produce a single, meaningful value such as average or sum?
  • Which encryption scheme uses two different keys for encryption and decryption?
  • What is pseudonymization in data privacy?
  • What data describes other data, such as the size of an image, the number of colors, or the resolution?
  • Which of the following describes a primary benefit of using APIs?
  • Which extension is commonly used for photographs and uses lossy compression?
  • Which statement describes the benefit of meaningful function names?
  • What is the primary difference between symmetric and asymmetric encryption?
  • Which statement about binary code is true?
  • Why is adding a salt to a password before hashing important?
  • What term refers to the original data as it was collected?
  • Which extension denotes a compressed archive format that may contain one or more files or directories?
  • Complete the term: uniform resource ________.
  • When would you choose a while loop over a for loop?
  • Which of the following is a common aggregation operation that computes a single value from a set of values?
  • When would you prefer a recursive solution over an iterative one?
  • Which extension is used for a graphics format that supports lossless compression and is widely used for web graphics?
  • Which extension denotes a graphics format that supports lossless data compression and is commonly used on the web?
  • Why is breaking data into packets useful in network communication?
  • In programming, what best distinguishes a parameter from an argument?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • In a function call, what term refers to the actual value supplied to the function?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • In programming, a value that can be TRUE or FALSE is called a
  • What happens if a recursive function never reaches the base case?
  • Which term refers to extremely large datasets that traditional data processing methods can't handle?
  • Which term describes images, diagrams, or tables created from data to highlight a data story?
  • Which license enables free distribution of a work and permits sharing, use, and adaptation?
  • Which compression preserves all original data?
  • Which of the following illustrates an abstraction layer and its benefit?
  • Which graph traversal algorithm visits as far as possible along a branch before backtracking?
  • With 8 bits, what is the maximum number of distinct values that can be represented?
  • Which practice improves modularity in software design?
  • Which of the following is a valid way to access the property named 'name' on an object 'person' using dot notation?
  • When you transform numerical data into charts or images to tell a story, this is called what?
  • What is the universally recognized raw text format that any computer can understand?
  • Which statement about Moore's Law is accurate?
  • What is the representation of processor instructions using binary digits 0 and 1 called?
  • Which term describes the practice of creating concise representations to help understanding of complex phenomena?
  • What is the role of the Domain Name System (DNS) on the Internet?
  • What term describes an incremental or small improvement to an item?
  • Which term describes a novel or improved idea, device, or product?
  • What hex value represents black in 32-bit hex color?
  • What term describes a value's property that tells the computer how to interpret the value?
  • What term describes the act of repeating a process?
  • Which topology is typically easy to manage due to a central hub but can be a single point of failure?
  • Which protocol provides reliable, ordered and error checked delivery of a stream of packets?
  • What term describes a problem-solving approach to find a satisfactory solution when an optimal solution is impractical or impossible?
  • Which option correctly expands the acronym ASCII?
  • Which of the following is true about the end of an array when using common array methods?
  • In ASCII, how many bits are used to represent a character, and how is that typically stored in modern systems?
  • Which statement about histograms is true?
  • Which unit equals 1024 megabytes?
  • What is printed by the following code when x equals 12: if (x > 10) { print('big'); } else { print('small'); }
  • Which type of statements run only under certain conditions?
  • Which topology is described as providing high redundancy and fault tolerance?
  • Which file extension is commonly used for a lossy image format designed for photographs?
  • Apply De Morgan's law to the expression ¬(A ∧ B).
  • Redundancy in data transmission is best described as the repetition of information to reduce errors.
  • What term refers to repeating a process, often with each repetition moving toward an end point?
  • What is the address used to call a web page?
  • What does RFC stand for in networking standards?
  • Which binary value represents decimal 14?
  • Which unit equals 1024 bytes?
  • Which symbol represents the logical NOT operator?
  • Which term denotes a basic unit of data used to measure memory capacity?
  • Which extension is a graphics format with lossless compression and supports transparency?
  • What term refers to a type of data used for graphics or pictures?
  • Which statement comparing ASCII and Unicode is correct?
  • What is the difference between ASCII and Unicode, and why is Unicode necessary?
  • Which encryption method involves substituting each letter with another letter according to a fixed mapping?
  • What general distinction exists between HTTP GET and POST requests?
  • Which traversal visits a node's deepest descendants before its siblings?
  • Which tool or technique uses dynamic parameters to reduce a data set to viewing only similar items in a row or column?
  • What is the purpose of a checksum in data transmission?
  • Which term describes the attempt to decode a secret message without knowing all the specifics of the cipher?
  • What hex value represents white in 32-bit hex color?
  • What term describes the ability to route around broken servers on the Internet?
  • Which cipher uses a keyword to determine shifts for each letter in the plaintext?
  • What extension corresponds to the Waveform Audio File Format for storing uncompressed audio data?
  • What does an IPv4 private address such as 192.168.0.1 signify in a local network?
  • Which numbering system uses digits 0-9?
  • Which operator would you use to test if at least one of two conditions is true?
  • What is the generic term for a programming statement that uses a Boolean condition to determine whether to run a certain block of statements?
  • What is the precise sequence of instructions for processes that can be executed by a computer?
  • Name two common network topologies and one advantage for each.
  • A Kilobyte is equal to how many Bytes?
  • If the data set is [2, 5, 5, 7, 9], what is the median?
  • Why is it beneficial to design a function with a single responsibility and descriptive name?
  • What term refers to the gap between people with ready access to computers and the Internet and those without?
  • One Gigabyte is equal to how many Megabytes?
  • What is the 8-bit data unit called?
  • Which HTTP method is typically used when the request should be idempotent and have no side effects on the server?
  • What condition is required for efficient binary search?
  • Which symbol represents the 'or' logical operator?
  • 1024 megabytes is equal to which unit?
  • HTTP stands for...
  • What term refers to the visual elements of a program through which a user interacts with the application?
  • What word completes the acronym ASCII: American Standard Code for Information Interchange?
  • Which hexadecimal digit represents decimal 15?
  • If a loop processes n items with constant work per item, what is the overall time complexity?
  • What term describes an action that causes something to happen in a program?
  • Which statement about DNS is true?
  • Why include an edge-case test with empty input?
  • What word describes the act of writing instructions for a computer?
  • Which statement best differentiates data privacy from data security?
  • Which option lists the symbols used in binary code?
  • One Kilobyte is equal to how many bytes?
  • What is the main difference between HTTP and HTTPS?
  • Which extension is a compressed archive format that can contain multiple files?
  • Which statement correctly describes the prerequisite and time complexity of a binary search?
  • What term describes secure web messaging where the encryption key is public and the decryption key is private?
  • What is the purpose of a base case in a recursive function?
  • Which option describes the secure transport protocol used for web traffic?
  • Complete the term: transmission ____________ protocol.
  • What describes a set of rules governing the exchange or transmission of data between devices?
  • Which operator is used to negate a boolean condition?
  • Which feature of high-level languages most contributes to portability across computer systems?
  • Which extension denotes a bitmap image format?
  • What term describes the repetition of information to reduce errors in transmission?
  • How do you add an element to the end of an array named arr in JavaScript?
  • Which operator would you use to perform logical OR?
  • Why is hashing a password preferable to storing it in plain text?
  • Which file extension corresponds to a commonly used lossy audio format?
  • Which encryption technique shifts every letter by a fixed number of positions in the alphabet?
  • Which term describes a single data element that defines the color value in an image?
  • What term describes a preliminary sketch or model for something new?
  • What term refers to the endings of file names that indicate the format for how the underlying bits are organized?
  • Why is random sampling important in data analysis?
  • What is a Unicode code point?
  • Which term is a broad umbrella for methods that perform encryption?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • 1024 gigabytes is equal to which storage unit?
  • Which term describes the initial set of data as collected, prior to any cleaning or processing steps?
  • Which characteristic describes a high-level programming language?
  • What is the hexadecimal digit that represents decimal 15?
  • What is scope in programming?
  • What concept dictates what portions of code can access a variable, depending on where created?
  • What is a placeholder for information that can change during a program's execution?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy