College Board 2021 AP CSP MCQ Corrections

Score: 62/70

Score

Question 9

Score

Analog signals are sampled digitally at discrete intervals over time. These samples, like all digital data, are represented at the lowest level as a sequence of bits.

Analog audio signals are typically represented by computers through a process called analog-to-digital conversion (ADC). This involves measuring the signal at regular intervals and storing each measurement as a sample, which is then represented as a sequence of bits. This method allows computers to accurately capture and process the continuous waveform of analog audio signals in a digital format, enabling various audio processing and playback tasks.

Question 24

Score

In situations where minimizing data size or transmission time is maximally important, lossy compression algorithms are typically chosen.

Lossless compression reduces file size without any loss of data, maintaining the original quality when the file is decompressed. It’s suitable for scenarios where preserving data integrity is paramount, such as archiving documents or transmitting critical information. Lossy compression, however, sacrifices some data to achieve higher compression ratios, making it ideal for multimedia applications like streaming audio or video where reducing file size is crucial and slight loss of quality is acceptable.

Question 42

Score

The expression (item MOD 2) evaluates to 1 for odd values and evaluates to 0 for even values. As a result, the code segment adds 1 to result for each odd value in integerList. There are three odd values in the list, so 3 is displayed.

Question 45

Score

Score

In this code segment, the first call to botStepper moves the robot forward two squares, rotates it left so that it faces toward the top of the grid, moves it forward two squares, and rotates it right so that it faces right. The code segment then moves the robot forward one square. The second call to botStepper moves the robot forward three squares, rotates it left so that it faces toward the top of the grid, moves it forward three squares, and rotates it right so that it faces right. The robot ends in the gray square.

Question 50

Score

Symmetric encryption uses a single key for both encryption and decryption of data. Since the key can be used to unlock the data, it should be kept secret.

Question 55

Score

This code segment assigns the value of the last element of the list to the variable temp, then removes the last element of the list, then inserts temp as the first element of the list.

Question 66

Score

Score

In A, segment assigns 500 bonus points by default. If timer is less than 30, no additional bonus points are added. If timer is between 30 and 60 inclusive, bonus is incremented by 500 in the first IF block. If timer is greater than 60, bonus is incremented by 500 twice (once in each IF block). The correct number of bonus points is assigned to bonus for all possible values of timer.

In D, if timer is greater than 60, bonus is assigned 1500 in the first IF block. If timer is between 30 and 60, inclusive, bonus is assigned 1000 in the second IF block. If timer is less than 30, bonus is assigned 500 in the third IF block. The correct number of bonus points is assigned to bonus for all possible values of timer.

Question 69

Score

Metadata is essentially data that provides information about other data. In the context of digital photos, metadata includes details such as the date, time, and geographic location where the photo was taken, along with other information like camera settings, resolution, etc.