Search Header Logo

AP CSP Distance Learning Test

Authored by Lauren Wise-Moore

Computers

9th - 12th Grade

Used 9+ times

AP CSP Distance Learning Test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

The code segment above is intended to swap the values of the variables first and second using a temporary variable, temp.

Which of the following can be used to replace <MISSING CODE> so that the code segment works as intended?

second <-- first

second <-- temp

temp <-- first

temp <-- second

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter "G" is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table above.

ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the 8-bit binary value: 0100 0010

ASCII Character: A

ASCII Character: B

ASCII Character: D

The table does not contain the value represented by the binary number 0100 0010

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is NOT true about TCP/IP packets?

Packets are numbered so if they arrive out of order the message can be reassembled.

TCP guarantees that no packets are ever dropped

Packets can be routed on different paths from sender to receiver.

Messages are broken into packets to improve reliability of the internet

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

A compression scheme for long strings of bits called run-length encoding is described as follows:

Rather than record each 0 and 1 individually, instead record "runs" of bits by storing the number of consecutive 1s and 0s that appear. Since it's binary, any run of 0s must be followed by a run of 1s (even if the run is only 1-bit long) and vice versa. Thus, you can store a list of small numbers that represents the alternating runs of 0s and 1s. There is an example pictured above.

To uncompress the data back into its original binary state, you simply reverse the process. This technique is an example of what type of compression?

Lossless compression

Fast Fourier Transform compression

Lossy compression

Tailored compression

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

A raw digital sound file samples a sound wave at some interval and measures the height of the wave at each point. Thus, raw sound is recorded as a list of numbers.

In very broad terms the MP3 audio compression algorithm identifies frequencies and volume levels - low and high - that are outside the range of human hearing and removes the data representing these frequencies from the original. This technique results in a smaller audio file that sounds exactly the same to the human ear. This technique is an example of what type of compression?

Fast Fourier Transform compression

Lossless compression

Lossy compression

Tailored compression

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?

When the problem can be solved in a reasonable time and an approximate solution is acceptable

When the problem can be solved in a reasonable time and an exact solution is needed

When the problem cannot be solved in a reasonable time and an approximate solution is acceptable

When the problem cannot be solved in a reasonable time and an exact solution is needed

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

5. The following question uses a robot in a grid of squares. The robot is represented as a triangle,

which is initially in the bottom left square of the grid and facing right.

Which of the following shows the location of the robot after running the code segment?

Media Image
Media Image
Media Image
Media Image

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?