AP CSP FInal Review
Which of the following best explains how data is transmitted on the Internet?
Data is broken into packets, which can be sent along different paths.
Which of the following best describes the role of the Internet Engineering Task Force (IETF)?
Developing standards and protocols for Internet communication
A NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the gate produces an output of true. Which of the following Boolean expressions correctly models a NAND gate with inputs P and Q?
NOT (P AND Q)
A user reads reviews of a popular artist's new album and then downloads the album from the Web site of a licensed online music seller. Which of the following is LEAST likely to be a consequence of this action?
The user will be in violation of the Digital Millennium Copyright Act (DMCA).
A student wants to create an algorithm that can determine, given any program and program input, whether or not the program will go into an infinite loop for that input. The problem the student is attempting to solve is considered an undecidable problem. Which of the following is true?
It is not probable to create an algorithm that will solve the problem for all programs and inputs.
Which of the following actions could be used to help reduce the digital divide? I. Providing free education and training on how to use computing devices II. Providing free or low-cost computing devices to low-income individuals III. Providing networks and infrastructure to people in remote areas
I, II, and III
Which of the following is an example of an attack using a rogue access point?
An unauthorized individual gains the ability to view network traffic by connecting to a network router that uses weak or no security measures
A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory?
7
A student is writing a program to model different real-world events using simulations. Which of the following simulations will generate a result that would best be stored using a Boolean variable?
A simulation of flipping a fair coin
Which of the following best describes the impact of Creative Commons?
Creative Commons gives creators of digital content the ability to indicate how their works can be legally used and distributed, enabling broad access to digital information
A smartphone stores the following data for each photo that is taken using the phone. - The file name of the photo - The date and time the photo was taken - The geographic location where the photo was taken Assume that all of the photos that have been taken on the phone are accessible. Which of the following can be determined using the photo data described above? I. The number of photos that were taken at a particular geographic location. II. The number of photos that were taken in the last year III. The name of the person who took the most recent photo
I and II only
Which of the following are true statements about how the Internet enables crowdsourcing? I. The Internet can provide crowdsourcing participants access to useful tools, information, and professional knowledge. II. The speed and reach of the Internet can lower geographic barriers, allowing individuals from different locations to contribute to projects. III. Using the Internet to distribute solutions across many users allows all computational problems to be solved in reasonable time, even for very large input sizes.
I and II only
Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer. 1. An algorithm that accesses each element in the list twice 2. An algorithm that accesses each item in the list n times 3. An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list Which of the algorithms run in reasonable time?
I, II, and III
A certain social media application is popular with people across the United States. The developers of the application are updating the algorithm used by the application to introduce a new feature that allows users of the application with similar interests to connect with one another. Which of the following strategies is LEAST likely to introduce bias into the application?
Inviting a random sample of all users to try out the new algorithm and provide feedback before it is released to a wider audience
Which of the following explains a benefit of using open standards and protocols for Internet communication?
Open standards and protocols allow different manufacturers and developers to build hardware and software that can communicate with hardware and software on the rest of the network.
A population researcher is interested in predicting the number of births that will occur in a particular community. She created a computer model that uses data from the past ten years, including number of residents and the number of babies born. The model predicted that there would be 200 births last year, but the actual number of births last year was only 120. Which of the following strategies is LEAST likely to provide a more accurate prediction?
Removing as many details from the model as possible so that the calculations can be performed quickly
Which of the following is NOT an advantage of using open-source software?
The original developer of open-source software provides free or low-cost support for users installing and running the software
In public key cryptography, the sender uses the recipient's public key to encrypt a message. Which of the following is needed to decrypt the message?
The recipient's private key
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters. For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" by replacing all instances of "IS" with "#". For which of the following strings is it not possible to use byte pair encoding to shorten the string's length.
"LEVEL_UP"
To be eligible for a particular ride at an amusement park, a person must be at least 12 years old and must be between 50 and 80 inches tall, inclusive.
(age >= 12) and ( ( height >= 50) AND ( height <= 80) )
Internet protocol version 4 (IPv4) represents each IP address as a 32-bit binary number. Internet protocol version 6 (IPv6) represent each IP address as a 128-bit binary number. Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses?
2^96 times as many addresses are available
A sorted list of numbers contains 128 elements. Which of the following is closest to the maximum number of list elements that can be examined when performing a binary search for a value in the list?
8
A text-editing application uses binary sequences to represent each of 200 different characters. What is the minimum number of bits needed to assign a unique bit sequence to each of the possible characters?
8
A person wants to transmit an audio file from a device to a second device. Which of the following scenarios best demonstrates the use of lossless compression of the original audio file?
A device compresses the audio file before transmitting it to a second device. The second device restores the compressed file to its original version before playing it.
Which of the following scenarios best exemplifies a phishing attack?
A user receives an e-mail from a sender offering technical help with the user's computer. The e-mail prompts the user to start a help session by clicking a provided link and entering the username and password associated with the user's computer.
Which of the following best exemplifies the use of multifactor authentication to protect an online banking system?
After entering a password for an online bank account, a user must also enter a code that is sent to the user's phone via text message.
A library of e-books contains metadata for each book. The metadata are intended to help a search feature find books that users are interested in. Which of the following is LEAST likely to be contained in the metadata of each e-book?
An archive containing previous versions of the e-book
Which of the following would be the best use of citizen science?
An experiment that requires data measurements to be taken in many different locations
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters. For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" by replacing all instances of "IS" with "#". Which of the following statements about byte pair encoding is true?
Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.
A bank customer receives an e-mail from a sender claiming to be a bank employee. The e-mail asks the customer to provide personal information and to call a phone number if he or she has any questions. The customer suspects the e-mail might be a phishing attempt. Which of the following responses is most likely to be a privacy risk for the bank customer?
Calling the phone number given in the e-mail and providing the personal information over the phone
Which of the following is a true statement about Internet communication?
Every device connected to the Internet is assigned an Internet protocol (IP) address.
Which of the following is an example of symmetric encryption?
Finn and Gwen developed a system that maps each letter of the alphabet to a unique symbol using a secret key. Finn uses the key to write a message to Gwen where each letter is replaced with the corresponding symbol. Gwen uses the key to map each symbol back to the original letter.
A local router is configured to limit the bandwidth of guest users connecting to the Internet. Which of the following best explains the result of this configuration as compared to a configuration in which the router does not limit the bandwidth?
Guest users will be restricted in the maximum amount of data that they can send and receive per second
A computer program uses 4 bits to represent non-negative integers. Which of the following statements describe a possible result when the program uses this number representation? I. The operation 4+8 will result in an overflow error. II. The operation 7+10 will result in an overflow error. III. The operation 12+3 will result in an overflow error.
II only
Which of the following best describes one of the benefits of using an iterative and incremental process of program development?
It helps programmers identify errors as components are added to a working program.
An application program interface (API) provides a procedure Max, which returns the greater of its two integer arguments. A programmer would like to find the greatest of three integer values a, b, and c. Which of the following expressions will produce the desired result in every case?
Max (Max (a, b), c)
A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to contribute to the digital divide rather than reducing it?
Requiring applicants for government jobs to apply using an online platform
An internet user has a need to send private data to another user. Which of the following provides the most security when transmitting private data?
Sending the data using public-key encryption
In which of the following situations would it be most appropriate to choose lossy compression over lossless compression?
Storing music files on a smartphone in order to maximize the number the number of songs that can be stored.
Which of the following best explains how symmetric encryption algorithms are typically used?
Symmetric encryption uses a single key that should be kept secret. The same key is used for both encryption and decryption of data.
A video-streaming Web site keeps count of the number of times each video has been played since it was first added to the site. The count is updated each time a video is played and is displayed next to each video to show its popularity. At one time, the count for the most popular video was about two million. Sometime later, the same video displayed a seven-digit negative number as its count, while the counts for the other videos displayed correctly. Which of the following is the most likely explanation for the error?
The count for the video became larger than the maximum value allowed by the data type used to store the count.
A computer program performs the operation 2/3 and represent 0.6666667 as the value. Which of the following best explains this result?
The precision of the result is limited due to the constraints of using a floating-point representation
A binary number is to be transformed by appending three 0s to the end of the number. For example, 11101 is transformed to 11101000. Which of the following correctly describes the relationship between the transformed number and the original number?
The transformed number is 8 times the value of the original number
Which of the following best describes the purpose of machine learning programs?
To analyze large data sets, recognize patterns, and make predictions based on data
The transmission control protocol (TCP) and Internet protocol (IP) are used in Internet communication. Which of the following best describes the purpose of these protocols?
To establish a common standard for sending messages between devices on the Internet.
Which of the following is an example of a phishing attack?
Using fraudulent e-mails in order to trick a user into voluntarily providing sensitive information
A media librarian at a movie studio is planning to save digital video files for archival purposes. The movie studio would like to be able to access full-quality videos if they are needed for future projects. Which of the following actions is LEAST likely to support the studio's goal?
Using lossy compression software to reduce the size requirements of the data being stored
A musician is creating a song using audio samples. Which of the following actions will minimize the risk of a copyright violation when creating sample-based music?
Using samples published with a no-rights reserved Creative Commons license.